diff --git a/examples/all-clusters-app/nxp/mw320/main.cpp b/examples/all-clusters-app/nxp/mw320/main.cpp index 52fbb40964aeff..8ca7e735bea9f5 100644 --- a/examples/all-clusters-app/nxp/mw320/main.cpp +++ b/examples/all-clusters-app/nxp/mw320/main.cpp @@ -811,55 +811,55 @@ std::string createSetupPayload() #if 0 void demo_init(void) { - struct wlan_network network; + struct wlan_network network; int ret = 0; - // add uAP profile + // add uAP profile memset(&network, 0, sizeof(struct wlan_network)); memcpy(network.name, profile, strlen(profile)); - memcpy(network.ssid, ssid, strlen(ssid)); - network.channel = 1; + memcpy(network.ssid, ssid, strlen(ssid)); + network.channel = 1; - network.ip.ipv4.address = net_inet_aton(network_ip); + network.ip.ipv4.address = net_inet_aton(network_ip); network.ip.ipv4.gw = net_inet_aton(network_ip); network.ip.ipv4.netmask = net_inet_aton(network_netmask); - network.ip.ipv4.addr_type = ADDR_TYPE_STATIC; + network.ip.ipv4.addr_type = ADDR_TYPE_STATIC; - network.security.psk_len = strlen(psk); + network.security.psk_len = strlen(psk); strcpy(network.security.psk, psk); - network.security.type = WLAN_SECURITY_WPA2; + network.security.type = WLAN_SECURITY_WPA2; - network.role = WLAN_BSS_ROLE_UAP; + network.role = WLAN_BSS_ROLE_UAP; ret = wlan_add_network(&network); switch (ret) { - case WM_SUCCESS: - PRINTF("Added \"%s\"\r\n", network.name); - break; - case -WM_E_INVAL: - PRINTF("Error: network already exists or invalid arguments\r\n"); - break; - case -WM_E_NOMEM: - PRINTF("Error: network list is full\r\n"); - break; - case WLAN_ERROR_STATE: - PRINTF("Error: can't add networks in this state\r\n"); - break; - default: - PRINTF( - "Error: unable to add network for unknown" - " reason\r\n"); - break; + case WM_SUCCESS: + PRINTF("Added \"%s\"\r\n", network.name); + break; + case -WM_E_INVAL: + PRINTF("Error: network already exists or invalid arguments\r\n"); + break; + case -WM_E_NOMEM: + PRINTF("Error: network list is full\r\n"); + break; + case WLAN_ERROR_STATE: + PRINTF("Error: can't add networks in this state\r\n"); + break; + default: + PRINTF( + "Error: unable to add network for unknown" + " reason\r\n"); + break; } - // start uAP + // start uAP ret = wlan_start_network(profile); if (ret != WM_SUCCESS) PRINTF("Error: unable to start network\r\n"); - else - PRINTF("start uAP ssid: %s\r\n", network.ssid); + else + PRINTF("start uAP ssid: %s\r\n", network.ssid); } #endif // 0 @@ -956,7 +956,7 @@ void task_main(void * param) { /* wait for interface up */ os_thread_sleep(os_msec_to_ticks(5000)); - PRINTF("[%s]: looping\r\n", __FUNCTION__); + PRINTF("[%s]: looping\r\n", __FUNCTION__); } #endif // 0 } @@ -1388,22 +1388,22 @@ static void OnSwitchAttributeChangeCallback(EndpointId endpointId, AttributeId a VerifyOrExit(attributeId == ZCL_CURRENT_POSITION_ATTRIBUTE_ID, ChipLogError(DeviceLayer, "Unhandled Attribute ID: '0x%04lx", attributeId)); // Send the switch status report now -/* - for (uint32_t i = 0 ; iGetNumActiveReadHandlers() ; i++) { - ReadHandler * phandler = pimEngine->ActiveHandlerAt(i); - if (phandler->IsType(chip::app::ReadHandler::InteractionType::Subscribe) && - (phandler->IsGeneratingReports() || phandler->IsAwaitingReportResponse())) { - phandler->UnblockUrgentEventDelivery(); - do_sendrpt = true; - break; - } - } - if (do_sendrpt == true) { - ConcreteEventPath event_path(endpointId, ZCL_SWITCH_CLUSTER_ID, 0); - pimEngine->GetReportingEngine().ScheduleEventDelivery(event_path, chip::app::EventOptions::Type::kUrgent, - sizeof(uint16_t)); - } -*/ + /* + for (uint32_t i = 0 ; iGetNumActiveReadHandlers() ; i++) { + ReadHandler * phandler = pimEngine->ActiveHandlerAt(i); + if (phandler->IsType(chip::app::ReadHandler::InteractionType::Subscribe) && + (phandler->IsGeneratingReports() || phandler->IsAwaitingReportResponse())) { + phandler->UnblockUrgentEventDelivery(); + do_sendrpt = true; + break; + } + } + if (do_sendrpt == true) { + ConcreteEventPath event_path(endpointId, ZCL_SWITCH_CLUSTER_ID, 0); + pimEngine->GetReportingEngine().ScheduleEventDelivery(event_path, chip::app::EventOptions::Type::kUrgent, + sizeof(uint16_t)); + } + */ exit: return; } diff --git a/examples/chef/chef.py b/examples/chef/chef.py index 4796b795981c06..4af9a9298b1c98 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -38,7 +38,9 @@ _CHEF_SCRIPT_PATH = os.path.abspath(os.path.dirname(__file__)) _REPO_BASE_PATH = os.path.join(_CHEF_SCRIPT_PATH, "../../") _DEVICE_FOLDER = os.path.join(_CHEF_SCRIPT_PATH, "devices") -_DEVICE_LIST = [file[:-4] for file in os.listdir(_DEVICE_FOLDER) if file.endswith(".zap")] +_DEVICE_LIST = [ + file[:-4] for file in os.listdir(_DEVICE_FOLDER) if file.endswith(".zap") +] _CICD_CONFIG_FILE_NAME = os.path.join(_CHEF_SCRIPT_PATH, "cicd_config.json") _CD_STAGING_DIR = os.path.join(_CHEF_SCRIPT_PATH, "staging") @@ -55,7 +57,8 @@ def splash() -> None: | | | __ | | __| | __| | `----.| | | | | |____ | | \\______||__| |__| |_______||__|{TermColors.STRRESET} - """) + """ + ) flush_print(splashText) @@ -65,20 +68,24 @@ def load_config() -> None: config["esp32"] = dict() config["silabs-thread"] = dict() configFile = f"{_CHEF_SCRIPT_PATH}/config.yaml" - if (os.path.exists(configFile)): - configStream = open(configFile, 'r') + if os.path.exists(configFile): + configStream = open(configFile, "r") config = yaml.load(configStream, Loader=yaml.SafeLoader) configStream.close() else: - flush_print("Running for the first time and configuring config.yaml. " + - "Change this configuration file to include correct configuration " + - "for the vendor's SDK") - configStream = open(configFile, 'w') - config["nrfconnect"]["ZEPHYR_BASE"] = os.environ.get('ZEPHYR_BASE') + flush_print( + "Running for the first time and configuring config.yaml. " + + "Change this configuration file to include correct configuration " + + "for the vendor's SDK" + ) + configStream = open(configFile, "w") + config["nrfconnect"]["ZEPHYR_BASE"] = os.environ.get("ZEPHYR_BASE") config["nrfconnect"]["TTY"] = None - config["esp32"]["IDF_PATH"] = os.environ.get('IDF_PATH') + config["esp32"]["IDF_PATH"] = os.environ.get("IDF_PATH") config["esp32"]["TTY"] = None - config["silabs-thread"]["GECKO_SDK"] = f"{_REPO_BASE_PATH}third_party/efr32_sdk/repo" + config["silabs-thread"][ + "GECKO_SDK" + ] = f"{_REPO_BASE_PATH}third_party/efr32_sdk/repo" config["silabs-thread"]["TTY"] = None config["silabs-thread"]["CU"] = None @@ -91,8 +98,7 @@ def load_config() -> None: def check_python_version() -> None: if sys.version_info[0] < 3: - flush_print('Must use Python 3. Current version is ' + - str(sys.version_info[0])) + flush_print("Must use Python 3. Current version is " + str(sys.version_info[0])) exit(1) @@ -102,9 +108,7 @@ def load_cicd_config() -> Dict[str, Any]: return config -def flush_print( - to_print: str, - with_border: bool = False) -> None: +def flush_print(to_print: str, with_border: bool = False) -> None: """Prints and flushes stdout buffer. Args: @@ -112,7 +116,7 @@ def flush_print( with_border: Add boarder above and below to_print. """ if with_border: - border = ('-' * len(to_print)) + '\n' + border = ("-" * len(to_print)) + "\n" to_print = f"{border}{to_print}\n{border}" print(to_print, flush=True) @@ -150,14 +154,12 @@ def bundle(platform: str, device_name: str) -> None: flush_print(f"No bundle function for {platform}!") exit(1) flush_print(f"Copying {matter_file}") - src_item = os.path.join(_DEVICE_FOLDER, - matter_file) + src_item = os.path.join(_DEVICE_FOLDER, matter_file) dest_item = os.path.join(_CD_STAGING_DIR, matter_file) shutil.copy(src_item, dest_item) flush_print(f"Generating metadata for {device_name}") metadata_file = zap_file_parser.generate_hash_metadata_file(zap_file) - metadata_dest = os.path.join(_CD_STAGING_DIR, - os.path.basename(metadata_file)) + metadata_dest = os.path.join(_CD_STAGING_DIR, os.path.basename(metadata_file)) shutil.copy(metadata_file, metadata_dest) @@ -167,9 +169,7 @@ def bundle(platform: str, device_name: str) -> None: def bundle_linux(device_name: str) -> None: - linux_root = os.path.join(_CHEF_SCRIPT_PATH, - "linux", - "out") + linux_root = os.path.join(_CHEF_SCRIPT_PATH, "linux", "out") map_file_name = f"{device_name}.map" src_item = os.path.join(linux_root, device_name) dest_item = os.path.join(_CD_STAGING_DIR, device_name) @@ -181,17 +181,10 @@ def bundle_linux(device_name: str) -> None: def bundle_nrfconnect(device_name: str) -> None: zephyr_exts = ["elf", "map", "hex"] - script_files = ["firmware_utils.py", - "nrfconnect_firmware_utils.py"] - nrf_root = os.path.join(_CHEF_SCRIPT_PATH, - "nrfconnect", - "build", - "zephyr") - scripts_root = os.path.join(_REPO_BASE_PATH, - "scripts", - "flashing") - gen_script_path = os.path.join(scripts_root, - "gen_flashing_script.py") + script_files = ["firmware_utils.py", "nrfconnect_firmware_utils.py"] + nrf_root = os.path.join(_CHEF_SCRIPT_PATH, "nrfconnect", "build", "zephyr") + scripts_root = os.path.join(_REPO_BASE_PATH, "scripts", "flashing") + gen_script_path = os.path.join(scripts_root, "gen_flashing_script.py") sub_dir = os.path.join(_CD_STAGING_DIR, device_name) os.mkdir(sub_dir) for zephyr_ext in zephyr_exts: @@ -223,11 +216,8 @@ def bundle_esp32(device_name: str) -> None: Args: device_name: The device to bundle. """ - esp_root = os.path.join(_CHEF_SCRIPT_PATH, - "esp32", - "build") - manifest_file = os.path.join(esp_root, - "chip-shell.flashbundle.txt") + esp_root = os.path.join(_CHEF_SCRIPT_PATH, "esp32", "build") + manifest_file = os.path.join(esp_root, "chip-shell.flashbundle.txt") with open(manifest_file) as manifest: for item in manifest: item = item.strip() @@ -247,7 +237,7 @@ def main(argv: Sequence[str]) -> None: # if sys.platform == "win32": - flush_print('Windows is currently not supported. Use Linux or MacOS platforms') + flush_print("Windows is currently not supported. Use Linux or MacOS platforms") exit(1) # @@ -256,7 +246,8 @@ def main(argv: Sequence[str]) -> None: deviceTypes = "\n ".join(_DEVICE_LIST) - usage = textwrap.dedent(f"""\ + usage = textwrap.dedent( + f"""\ usage: chef.py [options] Platforms: @@ -271,63 +262,178 @@ def main(argv: Sequence[str]) -> None: Notes: - Whenever you change a device type, make sure to also use options -zbe - Be careful if you have more than one device connected. The script assumes you have only one device connected and might flash the wrong one\ - """) + """ + ) parser = optparse.OptionParser(usage=usage) - parser.add_option("-u", "--update_toolchain", help="updates toolchain & installs zap", - action="store_true", dest="do_update_toolchain") - parser.add_option("-b", "--build", help="builds", - action="store_true", dest="do_build") - parser.add_option("-c", "--clean", help="clean build. Only valid if also building", - action="store_true", dest="do_clean") - parser.add_option("-f", "--flash", help="flashes device", - action="store_true", dest="do_flash") - parser.add_option("-e", "--erase", help="erases flash before flashing. Only valid if also flashing", - action="store_true", dest="do_erase") - parser.add_option("-i", "--terminal", help="opens terminal to interact with with device", - action="store_true", dest="do_interact") - parser.add_option("-m", "--menuconfig", help="runs menuconfig on platforms that support it", - action="store_true", dest="do_menuconfig") - parser.add_option("", "--bootstrap_zap", help="installs zap dependencies", - action="store_true", dest="do_bootstrap_zap") - parser.add_option("-z", "--zap", help="runs zap to generate data model & interaction model artifacts", - action="store_true", dest="do_run_zap") - parser.add_option("-g", "--zapgui", help="runs zap GUI display to allow editing of data model", - action="store_true", dest="do_run_gui") - parser.add_option("-d", "--device", dest="sample_device_type_name", - help="specifies device type. Default is lighting. See info above for supported device types", - metavar="TARGET", choices=_DEVICE_LIST) - parser.add_option("-t", "--target", type='choice', - action='store', - dest="build_target", - help="specifies target platform. Default is esp32. See info below for currently supported target platforms", - choices=['nrfconnect', 'esp32', 'linux', 'silabs-thread'], - metavar="TARGET", - default="esp32") - parser.add_option("-r", "--rpc", help="enables Pigweed RPC interface. Enabling RPC disables the shell interface. Your sdkconfig configurations will be reverted to default. Default is PW RPC off. When enabling or disabling this flag, on the first build force a clean build with -c", action="store_true", dest="do_rpc") - parser.add_option("-a", "--automated_test_stamp", help="provide the additional stamp \"branch:commit_id\" as the software version string for automated tests.", - action="store_true", dest="do_automated_test_stamp") - parser.add_option("-v", "--vid", dest="vid", type=int, - help="specifies the Vendor ID. Default is 0xFFF1", metavar="VID", default=0xFFF1) - parser.add_option("-p", "--pid", dest="pid", type=int, - help="specifies the Product ID. Default is 0x8000", metavar="PID", default=0x8000) - parser.add_option("", "--rpc_console", help="Opens PW RPC Console", - action="store_true", dest="do_rpc_console") - parser.add_option("-y", "--tty", help="Enumerated USB tty/serial interface enumerated for your physical device. E.g.: /dev/ACM0", - dest="tty", metavar="TTY", default=None) - parser.add_option("", "--use_zzz", help="Use pre generated output from the ZAP tool found in the zzz_generated folder. Used to decrease execution time of CI/CD jobs", - dest="use_zzz", action="store_true") - parser.add_option("", "--build_all", help="For use in CD only. Builds and bundles all chef examples for the specified platform. Uses --use_zzz. Chef exits after completion.", - dest="build_all", action="store_true") - parser.add_option("-k", "--keep_going", help="For use in CD only. Continues building all sample apps in the event of an error.", - dest="keep_going", action="store_true") parser.add_option( - "", "--ci", help="Builds Chef examples defined in cicd_config. Uses --use_zzz. Uses specified target from -t. Chef exits after completion.", dest="ci", action="store_true") + "-u", + "--update_toolchain", + help="updates toolchain & installs zap", + action="store_true", + dest="do_update_toolchain", + ) + parser.add_option( + "-b", "--build", help="builds", action="store_true", dest="do_build" + ) + parser.add_option( + "-c", + "--clean", + help="clean build. Only valid if also building", + action="store_true", + dest="do_clean", + ) + parser.add_option( + "-f", "--flash", help="flashes device", action="store_true", dest="do_flash" + ) + parser.add_option( + "-e", + "--erase", + help="erases flash before flashing. Only valid if also flashing", + action="store_true", + dest="do_erase", + ) + parser.add_option( + "-i", + "--terminal", + help="opens terminal to interact with with device", + action="store_true", + dest="do_interact", + ) + parser.add_option( + "-m", + "--menuconfig", + help="runs menuconfig on platforms that support it", + action="store_true", + dest="do_menuconfig", + ) + parser.add_option( + "", + "--bootstrap_zap", + help="installs zap dependencies", + action="store_true", + dest="do_bootstrap_zap", + ) + parser.add_option( + "-z", + "--zap", + help="runs zap to generate data model & interaction model artifacts", + action="store_true", + dest="do_run_zap", + ) + parser.add_option( + "-g", + "--zapgui", + help="runs zap GUI display to allow editing of data model", + action="store_true", + dest="do_run_gui", + ) + parser.add_option( + "-d", + "--device", + dest="sample_device_type_name", + help="specifies device type. Default is lighting. See info above for supported device types", + metavar="TARGET", + choices=_DEVICE_LIST, + ) + parser.add_option( + "-t", + "--target", + type="choice", + action="store", + dest="build_target", + help="specifies target platform. Default is esp32. See info below for currently supported target platforms", + choices=["nrfconnect", "esp32", "linux", "silabs-thread"], + metavar="TARGET", + default="esp32", + ) + parser.add_option( + "-r", + "--rpc", + help="enables Pigweed RPC interface. Enabling RPC disables the shell interface. Your sdkconfig configurations will be reverted to default. Default is PW RPC off. When enabling or disabling this flag, on the first build force a clean build with -c", + action="store_true", + dest="do_rpc", + ) + parser.add_option( + "-a", + "--automated_test_stamp", + help='provide the additional stamp "branch:commit_id" as the software version string for automated tests.', + action="store_true", + dest="do_automated_test_stamp", + ) + parser.add_option( + "-v", + "--vid", + dest="vid", + type=int, + help="specifies the Vendor ID. Default is 0xFFF1", + metavar="VID", + default=0xFFF1, + ) + parser.add_option( + "-p", + "--pid", + dest="pid", + type=int, + help="specifies the Product ID. Default is 0x8000", + metavar="PID", + default=0x8000, + ) + parser.add_option( + "", + "--rpc_console", + help="Opens PW RPC Console", + action="store_true", + dest="do_rpc_console", + ) + parser.add_option( + "-y", + "--tty", + help="Enumerated USB tty/serial interface enumerated for your physical device. E.g.: /dev/ACM0", + dest="tty", + metavar="TTY", + default=None, + ) + parser.add_option( + "", + "--use_zzz", + help="Use pre generated output from the ZAP tool found in the zzz_generated folder. Used to decrease execution time of CI/CD jobs", + dest="use_zzz", + action="store_true", + ) + parser.add_option( + "", + "--build_all", + help="For use in CD only. Builds and bundles all chef examples for the specified platform. Uses --use_zzz. Chef exits after completion.", + dest="build_all", + action="store_true", + ) parser.add_option( - "", "--ipv6only", help="Compile build which only supports ipv6. Linux only.", - action="store_true") + "-k", + "--keep_going", + help="For use in CD only. Continues building all sample apps in the event of an error.", + dest="keep_going", + action="store_true", + ) parser.add_option( - "", "--cpu_type", help="CPU type to compile for. Linux only.", choices=["arm64", "x64"]) + "", + "--ci", + help="Builds Chef examples defined in cicd_config. Uses --use_zzz. Uses specified target from -t. Chef exits after completion.", + dest="ci", + action="store_true", + ) + parser.add_option( + "", + "--ipv6only", + help="Compile build which only supports ipv6. Linux only.", + action="store_true", + ) + parser.add_option( + "", + "--cpu_type", + help="CPU type to compile for. Linux only.", + choices=["arm64", "x64"], + ) options, _ = parser.parse_args(argv) @@ -348,12 +454,10 @@ def main(argv: Sequence[str]) -> None: if sys.platform == "darwin": flush_print("Installation of ZAP OS packages not supported on MacOS") if sys.platform == "win32": - flush_print( - "Installation of ZAP OS packages not supported on Windows") + flush_print("Installation of ZAP OS packages not supported on Windows") flush_print("Running NPM to install ZAP Node.JS dependencies") - shell.run_cmd( - f"cd {_REPO_BASE_PATH}/third_party/zap/repo/ && npm install") + shell.run_cmd(f"cd {_REPO_BASE_PATH}/third_party/zap/repo/ && npm install") # # CI @@ -365,9 +469,13 @@ def main(argv: Sequence[str]) -> None: flush_print(f"{device_name} in CICD config but not {_DEVICE_FOLDER}!") exit(1) if options.build_target == "nrfconnect": - shell.run_cmd("export GNUARMEMB_TOOLCHAIN_PATH=\"$PW_ARM_CIPD_INSTALL_DIR\"") + shell.run_cmd( + 'export GNUARMEMB_TOOLCHAIN_PATH="$PW_ARM_CIPD_INSTALL_DIR"' + ) shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}") - command = f"./chef.py -cbr --use_zzz -d {device_name} -t {options.build_target}" + command = ( + f"./chef.py -cbr --use_zzz -d {device_name} -t {options.build_target}" + ) flush_print(f"Building {command}", with_border=True) shell.run_cmd(command) bundle(options.build_target, device_name) @@ -388,7 +496,9 @@ def main(argv: Sequence[str]) -> None: command = f"./chef.py -cbr --use_zzz -d {device_name} -t {platform}" flush_print(f"Building {command}", with_border=True) shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}") - shell.run_cmd("export GNUARMEMB_TOOLCHAIN_PATH=\"$PW_ARM_CIPD_INSTALL_DIR\"") + shell.run_cmd( + 'export GNUARMEMB_TOOLCHAIN_PATH="$PW_ARM_CIPD_INSTALL_DIR"' + ) try: shell.run_cmd(command) except RuntimeError as build_fail_error: @@ -431,18 +541,23 @@ def main(argv: Sequence[str]) -> None: flush_print(f"Target is set to {options.sample_device_type_name}") global gen_dir gen_dir = ( - f"{_CHEF_SCRIPT_PATH}/out/{options.sample_device_type_name}/zap-generated/") + f"{_CHEF_SCRIPT_PATH}/out/{options.sample_device_type_name}/zap-generated/" + ) flush_print("Setting up environment...") if options.build_target == "esp32": - if config['esp32']['IDF_PATH'] is None: - flush_print('Path for esp32 SDK was not found. Make sure esp32.IDF_PATH is set on your config.yaml file') + if config["esp32"]["IDF_PATH"] is None: + flush_print( + "Path for esp32 SDK was not found. Make sure esp32.IDF_PATH is set on your config.yaml file" + ) exit(1) plat_folder = os.path.normpath(f"{_CHEF_SCRIPT_PATH}/esp32") shell.run_cmd(f'source {config["esp32"]["IDF_PATH"]}/export.sh') elif options.build_target == "nrfconnect": - if config['nrfconnect']['ZEPHYR_BASE'] is None: - flush_print('Path for nrfconnect SDK was not found. Make sure nrfconnect.ZEPHYR_BASE is set on your config.yaml file') + if config["nrfconnect"]["ZEPHYR_BASE"] is None: + flush_print( + "Path for nrfconnect SDK was not found. Make sure nrfconnect.ZEPHYR_BASE is set on your config.yaml file" + ) exit(1) plat_folder = os.path.normpath(f"{_CHEF_SCRIPT_PATH}/nrfconnect") shell.run_cmd(f'source {config["nrfconnect"]["ZEPHYR_BASE"]}/zephyr-env.sh') @@ -450,7 +565,7 @@ def main(argv: Sequence[str]) -> None: elif options.build_target == "linux": pass elif options.build_target == "silabs-thread": - flush_print('Path to gecko sdk is configured within Matter.') + flush_print("Path to gecko sdk is configured within Matter.") else: flush_print(f"Target {options.build_target} not supported") @@ -466,7 +581,8 @@ def main(argv: Sequence[str]) -> None: elif options.build_target == "nrfconnect": flush_print("Updating toolchain") shell.run_cmd( - f"cd {_REPO_BASE_PATH} && python3 scripts/setup/nrfconnect/update_ncs.py --update") + f"cd {_REPO_BASE_PATH} && python3 scripts/setup/nrfconnect/update_ncs.py --update" + ) elif options.build_target == "silabs-thread": flush_print("Silabs-thread toolchain not supported. Skipping") elif options.build_target == "linux": @@ -480,14 +596,16 @@ def main(argv: Sequence[str]) -> None: flush_print("Starting ZAP GUI editor") shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/devices") shell.run_cmd( - f"{_REPO_BASE_PATH}/scripts/tools/zap/run_zaptool.sh {options.sample_device_type_name}.zap") + f"{_REPO_BASE_PATH}/scripts/tools/zap/run_zaptool.sh {options.sample_device_type_name}.zap" + ) if options.do_run_zap: flush_print("Running ZAP script to generate artifacts") shell.run_cmd(f"rm -rf {gen_dir}") shell.run_cmd(f"mkdir -p {gen_dir}") shell.run_cmd( - f"{_REPO_BASE_PATH}/scripts/tools/zap/generate.py {_CHEF_SCRIPT_PATH}/devices/{options.sample_device_type_name}.zap -o {gen_dir}") + f"{_REPO_BASE_PATH}/scripts/tools/zap/generate.py {_CHEF_SCRIPT_PATH}/devices/{options.sample_device_type_name}.zap -o {gen_dir}" + ) # af-gen-event.h is not generated shell.run_cmd(f"touch {gen_dir}/af-gen-event.h") @@ -502,7 +620,9 @@ def main(argv: Sequence[str]) -> None: elif options.build_target == "nrfconnect": shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/nrfconnect") shell.run_cmd("west build -t menuconfig") - elif (options.build_target == "silabs-thread") or (options.build_target == "silabs-wifi"): + elif (options.build_target == "silabs-thread") or ( + options.build_target == "silabs-wifi" + ): flush_print("Menuconfig not available on Silabs-thread target. Skipping") elif options.build_target == "linux": flush_print("Menuconfig not available on Linux target. Skipping") @@ -515,32 +635,43 @@ def main(argv: Sequence[str]) -> None: sw_ver_string = "" if options.do_automated_test_stamp: branch = "" - for branch_text in shell.run_cmd("git branch", return_cmd_output=True).split("\n"): + for branch_text in shell.run_cmd( + "git branch", return_cmd_output=True + ).split("\n"): match_texts = re.findall("\* (.*)", branch_text) if match_texts: branch = match_texts[0] break - commit_id = shell.run_cmd("git rev-parse HEAD", return_cmd_output=True).replace("\n", "") + commit_id = shell.run_cmd( + "git rev-parse HEAD", return_cmd_output=True + ).replace("\n", "") sw_ver_string = f"""{branch}:{commit_id}""" # 64 bytes space could only contain 63 bytes string + 1 byte EOS. if len(sw_ver_string) >= 64: truncated_sw_ver_string = f"""{branch[:22]}:{commit_id}""" flush_print( - f"""Truncate the software version string from \"{sw_ver_string}\" to \"{truncated_sw_ver_string}\" due to 64 bytes limitation""") + f"""Truncate the software version string from \"{sw_ver_string}\" to \"{truncated_sw_ver_string}\" due to 64 bytes limitation""" + ) sw_ver_string = truncated_sw_ver_string if options.use_zzz: flush_print("Using pre-generated ZAP output") - zzz_dir = os.path.join(_REPO_BASE_PATH, - "zzz_generated", - "chef-"+options.sample_device_type_name, - "zap-generated") + zzz_dir = os.path.join( + _REPO_BASE_PATH, + "zzz_generated", + "chef-" + options.sample_device_type_name, + "zap-generated", + ) if not os.path.exists(zzz_dir): - flush_print(textwrap.dedent(f"""\ + flush_print( + textwrap.dedent( + f"""\ You have specified --use_zzz for device {options.sample_device_type_name} which does not exist in the cached ZAP output. - """)) + """ + ) + ) exit(1) shutil.rmtree(gen_dir, ignore_errors=True) shutil.copytree(zzz_dir, gen_dir) @@ -549,28 +680,33 @@ def main(argv: Sequence[str]) -> None: flush_print("RPC PW enabled") if options.build_target == "esp32": shell.run_cmd( - f"export SDKCONFIG_DEFAULTS={_CHEF_SCRIPT_PATH}/esp32/sdkconfig_rpc.defaults") + f"export SDKCONFIG_DEFAULTS={_CHEF_SCRIPT_PATH}/esp32/sdkconfig_rpc.defaults" + ) else: flush_print(f"RPC PW on {options.build_target} not supported") else: flush_print("RPC PW disabled") - if (options.build_target == "esp32"): + if options.build_target == "esp32": shell.run_cmd( - f"export SDKCONFIG_DEFAULTS={_CHEF_SCRIPT_PATH}/esp32/sdkconfig.defaults") + f"export SDKCONFIG_DEFAULTS={_CHEF_SCRIPT_PATH}/esp32/sdkconfig.defaults" + ) - flush_print( - f"Product ID 0x{options.pid:02X} / Vendor ID 0x{options.vid:02X}") + flush_print(f"Product ID 0x{options.pid:02X} / Vendor ID 0x{options.vid:02X}") shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}") if (options.build_target == "esp32") or (options.build_target == "nrfconnect"): with open("project_include.cmake", "w") as f: - f.write(textwrap.dedent(f"""\ + f.write( + textwrap.dedent( + f"""\ set(CONFIG_DEVICE_VENDOR_ID {options.vid}) set(CONFIG_DEVICE_PRODUCT_ID {options.pid}) set(CONFIG_ENABLE_PW_RPC {"1" if options.do_rpc else "0"}) set(SAMPLE_NAME {options.sample_device_type_name}) - set(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING \"{sw_ver_string}\")""")) + set(CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING \"{sw_ver_string}\")""" + ) + ) if options.build_target == "esp32": shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/esp32") @@ -582,9 +718,11 @@ def main(argv: Sequence[str]) -> None: shell.run_cmd("idf.py build") shell.run_cmd("idf.py build flashing_script") shell.run_cmd( - f"(cd build/ && tar cJvf $(git rev-parse HEAD)-{options.sample_device_type_name}.tar.xz --files-from=chip-shell.flashbundle.txt)") + f"(cd build/ && tar cJvf $(git rev-parse HEAD)-{options.sample_device_type_name}.tar.xz --files-from=chip-shell.flashbundle.txt)" + ) shell.run_cmd( - f"cp build/$(git rev-parse HEAD)-{options.sample_device_type_name}.tar.xz {_CHEF_SCRIPT_PATH}") + f"cp build/$(git rev-parse HEAD)-{options.sample_device_type_name}.tar.xz {_CHEF_SCRIPT_PATH}" + ) elif options.build_target == "nrfconnect": shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/nrfconnect") nrf_build_cmds = ["west build -b nrf52840dk_nrf52840"] @@ -599,7 +737,8 @@ def main(argv: Sequence[str]) -> None: if options.do_clean: shell.run_cmd(f"rm -rf out/{options.sample_device_type_name}") shell.run_cmd( - f"""{_REPO_BASE_PATH}/scripts/examples/gn_efr32_example.sh ./ out/{options.sample_device_type_name} BRD4186A \'sample_name=\"{options.sample_device_type_name}\"\' enable_openthread_cli=true chip_build_libshell=true \'{'import("//with_pw_rpc.gni")' if options.do_rpc else ""}\'""") + f"""{_REPO_BASE_PATH}/scripts/examples/gn_efr32_example.sh ./ out/{options.sample_device_type_name} BRD4186A \'sample_name=\"{options.sample_device_type_name}\"\' enable_openthread_cli=true chip_build_libshell=true \'{'import("//with_pw_rpc.gni")' if options.do_rpc else ""}\'""" + ) shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}") elif options.build_target == "linux": @@ -608,29 +747,34 @@ def main(argv: Sequence[str]) -> None: linux_args = [] if options.do_rpc: linux_args.append('import("//with_pw_rpc.gni")') - linux_args.extend([ - 'import("//build_overrides/chip.gni")', - 'import("${chip_root}/config/standalone/args.gni")', - 'chip_shell_cmd_server = false', - 'chip_build_libshell = true', - 'chip_config_network_layer_ble = false', - f'target_defines = ["CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID={options.vid}", "CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID={options.pid}", "CONFIG_ENABLE_PW_RPC={int(options.do_rpc)}"]', - ]) + linux_args.extend( + [ + 'import("//build_overrides/chip.gni")', + 'import("${chip_root}/config/standalone/args.gni")', + "chip_shell_cmd_server = false", + "chip_build_libshell = true", + "chip_config_network_layer_ble = false", + f'target_defines = ["CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID={options.vid}", "CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID={options.pid}", "CONFIG_ENABLE_PW_RPC={int(options.do_rpc)}"]', + ] + ) if options.cpu_type == "arm64": uname_resp = shell.run_cmd("uname -m", return_cmd_output=True) if "aarch" not in uname_resp and "arm" not in uname_resp: if ( - "aarch" not in uname_resp and - "arm" not in uname_resp and - "SYSROOT_AARCH64" not in shell.env): + "aarch" not in uname_resp + and "arm" not in uname_resp + and "SYSROOT_AARCH64" not in shell.env + ): flush_print( "SYSROOT_AARCH64 env variable not set. " - "AARCH64 toolchain needed for cross-compiling for arm64.") + "AARCH64 toolchain needed for cross-compiling for arm64." + ) exit(1) - shell.env["PKG_CONFIG_PATH"] = ( - f'{shell.env["SYSROOT_AARCH64"]}/lib/aarch64-linux-gnu/pkgconfig') + shell.env[ + "PKG_CONFIG_PATH" + ] = f'{shell.env["SYSROOT_AARCH64"]}/lib/aarch64-linux-gnu/pkgconfig' linux_args.append('target_cpu="arm64"') - linux_args.append('is_clang=true') + linux_args.append("is_clang=true") linux_args.append('chip_crypto="mbedtls"') linux_args.append(f'sysroot="{shell.env["SYSROOT_AARCH64"]}"') elif options.cpu_type == "x64": @@ -643,14 +787,19 @@ def main(argv: Sequence[str]) -> None: if sw_ver_string: linux_args.append( - f'chip_device_config_device_software_version_string = "{sw_ver_string}"') + f'chip_device_config_device_software_version_string = "{sw_ver_string}"' + ) with open(f"{_CHEF_SCRIPT_PATH}/linux/args.gni", "w") as f: f.write("\n".join(linux_args)) with open(f"{_CHEF_SCRIPT_PATH}/linux/sample.gni", "w") as f: - f.write(textwrap.dedent(f"""\ + f.write( + textwrap.dedent( + f"""\ sample_zap_file = "{options.sample_device_type_name}.zap" sample_name = "{options.sample_device_type_name}" - """)) + """ + ) + ) if options.do_clean: shell.run_cmd(f"rm -rf out") shell.run_cmd("gn gen out") @@ -667,13 +816,14 @@ def main(argv: Sequence[str]) -> None: if options.do_flash: flush_print("Flashing target") if options.build_target == "esp32": - if config['esp32']['TTY'] is None: - flush_print('The path for the serial enumeration for esp32 is not set. Make sure esp32.TTY is set on your config.yaml file') + if config["esp32"]["TTY"] is None: + flush_print( + "The path for the serial enumeration for esp32 is not set. Make sure esp32.TTY is set on your config.yaml file" + ) exit(1) shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/esp32") if options.do_erase: - shell.run_cmd( - f"idf.py -p {config['esp32']['TTY']} erase-flash") + shell.run_cmd(f"idf.py -p {config['esp32']['TTY']} erase-flash") shell.run_cmd(f"idf.py -p {config['esp32']['TTY']} flash") elif options.build_target == "nrfconnect": shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/nrfconnect") @@ -681,9 +831,13 @@ def main(argv: Sequence[str]) -> None: shell.run_cmd("west flash --erase") else: shell.run_cmd("west flash") - elif (options.build_target == "silabs-thread") or (options.build_target == "silabs-wifi"): + elif (options.build_target == "silabs-thread") or ( + options.build_target == "silabs-wifi" + ): shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/efr32") - shell.run_cmd(f"python3 out/{options.sample_device_type_name}/BRD4186A/chip-efr32-chef-example.flash.py") + shell.run_cmd( + f"python3 out/{options.sample_device_type_name}/BRD4186A/chip-efr32-chef-example.flash.py" + ) shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}") @@ -694,30 +848,37 @@ def main(argv: Sequence[str]) -> None: if options.do_interact: flush_print("Starting terminal...") if options.build_target == "esp32": - if config['esp32']['TTY'] is None: - flush_print('The path for the serial enumeration for esp32 is not set. Make sure esp32.TTY is set on your config.yaml file') + if config["esp32"]["TTY"] is None: + flush_print( + "The path for the serial enumeration for esp32 is not set. Make sure esp32.TTY is set on your config.yaml file" + ) exit(1) shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/esp32") shell.run_cmd(f"idf.py -p {config['esp32']['TTY']} monitor") elif options.build_target == "nrfconnect": - if config['nrfconnect']['TTY'] is None: - flush_print('The path for the serial enumeration for nordic is not set. Make sure nrfconnect.TTY is set on your config.yaml file') + if config["nrfconnect"]["TTY"] is None: + flush_print( + "The path for the serial enumeration for nordic is not set. Make sure nrfconnect.TTY is set on your config.yaml file" + ) exit(1) shell.run_cmd("killall screen") shell.run_cmd(f"screen {config['nrfconnect']['TTY']} 115200") - elif (options.build_target == "silabs-thread"): - if config['silabs-thread']['TTY'] is None: + elif options.build_target == "silabs-thread": + if config["silabs-thread"]["TTY"] is None: flush_print( - 'The path for the serial enumeration for silabs-thread is not set. Make sure silabs-thread.TTY is set on your config.yaml file') + "The path for the serial enumeration for silabs-thread is not set. Make sure silabs-thread.TTY is set on your config.yaml file" + ) exit(1) shell.run_cmd("killall screen") shell.run_cmd(f"screen {config['silabs-thread']['TTY']} 115200 8-N-1") elif options.build_target == "linux": flush_print( - f"{_CHEF_SCRIPT_PATH}/linux/out/{options.sample_device_type_name}") + f"{_CHEF_SCRIPT_PATH}/linux/out/{options.sample_device_type_name}" + ) shell.run_cmd( - f"{_CHEF_SCRIPT_PATH}/linux/out/{options.sample_device_type_name}") + f"{_CHEF_SCRIPT_PATH}/linux/out/{options.sample_device_type_name}" + ) # # RPC Console @@ -725,23 +886,30 @@ def main(argv: Sequence[str]) -> None: if options.do_rpc_console: if options.build_target == "esp32": shell.run_cmd( - f"python3 -m chip_rpc.console --device {config['esp32']['TTY']}") - elif (options.build_target == "silabs-thread"): + f"python3 -m chip_rpc.console --device {config['esp32']['TTY']}" + ) + elif options.build_target == "silabs-thread": if (sys.platform == "linux") or (sys.platform == "linux2"): - if(config['silabs-thread']['TTY'] is None): + if config["silabs-thread"]["TTY"] is None: flush_print( - 'The path for the serial enumeration for silabs-thread is not set. Make sure silabs-thread.TTY is set on your config.yaml file') + "The path for the serial enumeration for silabs-thread is not set. Make sure silabs-thread.TTY is set on your config.yaml file" + ) exit(1) - shell.run_cmd(f"python3 -m chip_rpc.console --device {config['silabs-thread']['TTY']} -b 115200") + shell.run_cmd( + f"python3 -m chip_rpc.console --device {config['silabs-thread']['TTY']} -b 115200" + ) elif sys.platform == "darwin": - if(config['silabs-thread']['CU'] is None): + if config["silabs-thread"]["CU"] is None: flush_print( - 'The path for the serial enumeration for silabs-thread is not set. Make sure silabs-thread.CU is set on your config.yaml file') + "The path for the serial enumeration for silabs-thread is not set. Make sure silabs-thread.CU is set on your config.yaml file" + ) exit(1) - shell.run_cmd(f"python3 -m chip_rpc.console --device {config['silabs-thread']['CU']} -b 115200") + shell.run_cmd( + f"python3 -m chip_rpc.console --device {config['silabs-thread']['CU']} -b 115200" + ) flush_print("Done") -if __name__ == '__main__': +if __name__ == "__main__": sys.exit(main(sys.argv[1:])) diff --git a/examples/chip-tool/commands/common/Command.cpp b/examples/chip-tool/commands/common/Command.cpp index 59812076cfde75..35a9980a7f175c 100644 --- a/examples/chip-tool/commands/common/Command.cpp +++ b/examples/chip-tool/commands/common/Command.cpp @@ -55,7 +55,7 @@ bool Command::InitArguments(int argc, char ** argv) } } - VerifyOrExit((size_t)(argc) >= mandatoryArgsCount && (argvExtraArgsCount == 0 || (argvExtraArgsCount && optionalArgsCount)), + VerifyOrExit((size_t) (argc) >= mandatoryArgsCount && (argvExtraArgsCount == 0 || (argvExtraArgsCount && optionalArgsCount)), ChipLogError(chipTool, "InitArgs: Wrong arguments number: %d instead of %u", argc, static_cast(mandatoryArgsCount))); diff --git a/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm b/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm index e039391b8e6289..5d1bd7c9564b9b 100644 --- a/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm @@ -30,27 +30,29 @@ MTRDeviceController * commissioner = CurrentCommissioner(); ChipLogProgress(chipTool, "Sending command to node 0x" ChipLogFormatX64, ChipLogValueX64(mNodeId)); [commissioner getDevice:mNodeId - queue:callbackQueue - completionHandler:^(MTRDevice * _Nullable device, NSError * _Nullable error) { - if (error != nil) { - SetCommandExitStatus(error, "Error getting connected device"); - return; - } - - CHIP_ERROR err; - if (device == nil) { - err = CHIP_ERROR_INTERNAL; - } else { - err = SendCommand(device, mEndPointId); - } - - if (err != CHIP_NO_ERROR) { - ChipLogError(chipTool, "Error: %s", chip::ErrorStr(err)); - SetCommandExitStatus(err); - return; - } - }]; + queue:callbackQueue + completionHandler:^(MTRDevice * _Nullable device, NSError * _Nullable error) { + if (error != nil) { + SetCommandExitStatus(error, "Error getting connected device"); + return; + } + + CHIP_ERROR err; + if (device == nil) { + err = CHIP_ERROR_INTERNAL; + } else { + err = SendCommand(device, mEndPointId); + } + + if (err != CHIP_NO_ERROR) { + ChipLogError(chipTool, "Error: %s", chip::ErrorStr(err)); + SetCommandExitStatus(err); + return; + } + }]; return CHIP_NO_ERROR; } -void ModelCommand::Shutdown() { ResetArguments(); } +void ModelCommand::Shutdown() { + ResetArguments(); +} diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm index caebb41c20de2a..9f8e54c588019d 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm @@ -84,8 +84,8 @@ constexpr const char * identities[] = { kIdentityAlpha, kIdentityBeta, kIdentityGamma }; for (size_t i = 0; i < ArraySize(identities); ++i) { auto controllerParams = [[MTRDeviceControllerStartupParams alloc] initWithSigningKeypair:nocSigner - fabricId:(i + 1) - ipk:ipk]; + fabricId:(i + 1) + ipk:ipk]; // We're not sure whether we're creating a new fabric or using an // existing one, so just try both. @@ -119,15 +119,19 @@ std::string name = std::string(identity); if (name.compare(kIdentityAlpha) != 0 && name.compare(kIdentityBeta) != 0 && name.compare(kIdentityGamma) != 0) { ChipLogError(chipTool, "Unknown commissioner name: %s. Supported names are [%s, %s, %s]", name.c_str(), kIdentityAlpha, - kIdentityBeta, kIdentityGamma); + kIdentityBeta, kIdentityGamma); chipDie(); } mCurrentController = mControllers[name]; } -MTRDeviceController * CHIPCommandBridge::CurrentCommissioner() { return mCurrentController; } +MTRDeviceController * CHIPCommandBridge::CurrentCommissioner() { + return mCurrentController; +} -MTRDeviceController * CHIPCommandBridge::GetCommissioner(const char * identity) { return mControllers[identity]; } +MTRDeviceController * CHIPCommandBridge::GetCommissioner(const char * identity) { + return mControllers[identity]; +} void CHIPCommandBridge::ShutdownCommissioner() { @@ -146,7 +150,9 @@ auto waitingUntil = std::chrono::system_clock::now() + std::chrono::duration_cast(duration); { std::unique_lock lk(cvWaitingForResponseMutex); - if (!cvWaitingForResponse.wait_until(lk, waitingUntil, [this]() { return !this->mWaitingForResponse; })) { + if (!cvWaitingForResponse.wait_until(lk, waitingUntil, [this]() { + return !this->mWaitingForResponse; + })) { mCommandExitStatus = CHIP_ERROR_TIMEOUT; } } diff --git a/examples/darwin-framework-tool/commands/common/CHIPToolKeypair.mm b/examples/darwin-framework-tool/commands/common/CHIPToolKeypair.mm index 56be3fa36b15a3..65881cc8ce27f1 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPToolKeypair.mm +++ b/examples/darwin-framework-tool/commands/common/CHIPToolKeypair.mm @@ -48,12 +48,17 @@ - (SecKeyRef)publicKey { chip::Crypto::P256PublicKey publicKey = _mKeyPair.Pubkey(); NSData * publicKeyNSData = [NSData dataWithBytes:publicKey.Bytes() length:publicKey.Length()]; - NSDictionary * attributes = @{ - (__bridge NSString *) kSecAttrKeyClass : (__bridge NSString *) kSecAttrKeyClassPublic, - (NSString *) kSecAttrKeyType : (NSString *) kSecAttrKeyTypeECSECPrimeRandom, - (NSString *) kSecAttrKeySizeInBits : @Public_KeySize, - (NSString *) kSecAttrLabel : kCHIPToolKeychainLabel, - (NSString *) kSecAttrApplicationTag : @CHIPPlugin_CAKeyTag, + NSDictionary * attributes = @ { +(__bridge NSString *) kSecAttrKeyClass : + (__bridge NSString *) kSecAttrKeyClassPublic, +(NSString *) kSecAttrKeyType : + (NSString *) kSecAttrKeyTypeECSECPrimeRandom, +(NSString *) kSecAttrKeySizeInBits : + @Public_KeySize, +(NSString *) kSecAttrLabel : + kCHIPToolKeychainLabel, +(NSString *) kSecAttrApplicationTag : + @CHIPPlugin_CAKeyTag, }; return SecKeyCreateWithData((__bridge CFDataRef) publicKeyNSData, (__bridge CFDictionaryRef) attributes, nullptr); } diff --git a/examples/darwin-framework-tool/commands/common/MTRError.mm b/examples/darwin-framework-tool/commands/common/MTRError.mm index 5d0abd4b0137e8..e79b46a024bb08 100644 --- a/examples/darwin-framework-tool/commands/common/MTRError.mm +++ b/examples/darwin-framework-tool/commands/common/MTRError.mm @@ -83,11 +83,11 @@ CHIP_ERROR MTRErrorToCHIPErrorCode(NSError * error) code = static_cast([error.userInfo[@"errorCode"] unsignedLongValue]); break; } - // Weird error we did not create. Fall through. - default: - code = CHIP_ERROR_INTERNAL.AsInteger(); - break; - } + // Weird error we did not create. Fall through. + default: + code = CHIP_ERROR_INTERNAL.AsInteger(); + break; + } } return chip::ChipError(code); @@ -126,7 +126,7 @@ id NSObjectFromCHIPTLV(chip::TLV::TLVReader * data) return nil; } return [NSDictionary - dictionaryWithObjectsAndKeys:MTRBooleanValueType, MTRTypeKey, [NSNumber numberWithBool:val], MTRValueKey, nil]; + dictionaryWithObjectsAndKeys:MTRBooleanValueType, MTRTypeKey, [NSNumber numberWithBool:val], MTRValueKey, nil]; } case chip::TLV::kTLVType_FloatingPointNumber: { // Try float first @@ -142,7 +142,7 @@ id NSObjectFromCHIPTLV(chip::TLV::TLVReader * data) return nil; } return [NSDictionary - dictionaryWithObjectsAndKeys:MTRDoubleValueType, MTRTypeKey, [NSNumber numberWithDouble:val], MTRValueKey, nil]; + dictionaryWithObjectsAndKeys:MTRDoubleValueType, MTRTypeKey, [NSNumber numberWithDouble:val], MTRValueKey, nil]; } case chip::TLV::kTLVType_UTF8String: { uint32_t len = data->GetLength(); diff --git a/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm b/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm index 63078d94fed4e0..706969e645418a 100644 --- a/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm +++ b/examples/darwin-framework-tool/commands/pairing/OpenCommissioningWindowCommand.mm @@ -28,10 +28,10 @@ [controller openPairingWindow:mNodeId duration:mCommissioningWindowTimeoutMs error:&error]; } else { pairingCode = [controller openPairingWindowWithPIN:mNodeId - duration:mCommissioningWindowTimeoutMs - discriminator:mDiscriminator - setupPIN:arc4random() - error:&error]; + duration:mCommissioningWindowTimeoutMs + discriminator:mDiscriminator + setupPIN:arc4random() + error:&error]; } if (error != nil) { @@ -46,7 +46,7 @@ mWorkQueue = dispatch_queue_create("com.chip.open_commissioning_window", DISPATCH_QUEUE_SERIAL); mTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, mWorkQueue); auto * self = this; - dispatch_source_set_event_handler(mTimer, ^{ + dispatch_source_set_event_handler(mTimer, ^ { dispatch_source_cancel(mTimer); mTimer = nil; mWorkQueue = nil; diff --git a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm index 8a6935e9c6df34..df76636adb096f 100644 --- a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm @@ -101,10 +101,10 @@ SetUpPairingDelegate(); MTRDeviceController * commissioner = CurrentCommissioner(); [commissioner pairDevice:mNodeId - address:[NSString stringWithUTF8String:ipAddress] - port:mRemotePort - setupPINCode:mSetupPINCode - error:error]; + address:[NSString stringWithUTF8String:ipAddress] + port:mRemotePort + setupPINCode:mSetupPINCode + error:error]; } void PairingCommandBridge::Unpair() @@ -112,45 +112,45 @@ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip-tool.command", DISPATCH_QUEUE_SERIAL); MTRDeviceController * commissioner = CurrentCommissioner(); [commissioner getDevice:mNodeId - queue:callbackQueue - completionHandler:^(MTRDevice * _Nullable device, NSError * _Nullable error) { - CHIP_ERROR err = CHIP_NO_ERROR; - if (error) { - err = MTRErrorToCHIPErrorCode(error); - LogNSError("Error: ", error); - SetCommandExitStatus(err); - } else if (device == nil) { - ChipLogError(chipTool, "Error: %s", chip::ErrorStr(CHIP_ERROR_INTERNAL)); - SetCommandExitStatus(CHIP_ERROR_INTERNAL); - } else { - ChipLogProgress(chipTool, "Attempting to unpair device %llu", mNodeId); - MTROperationalCredentials * opCredsCluster = [[MTROperationalCredentials alloc] initWithDevice:device - endpoint:0 - queue:callbackQueue]; - [opCredsCluster readAttributeCurrentFabricIndexWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable readError) { - if (readError) { - CHIP_ERROR readErr = MTRErrorToCHIPErrorCode(readError); - LogNSError("Failed to get current fabric: ", readError); - SetCommandExitStatus(readErr); - return; - } - MTROperationalCredentialsClusterRemoveFabricParams * params = - [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; - params.fabricIndex = value; - [opCredsCluster removeFabricWithParams:params - completionHandler:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable removeError) { - CHIP_ERROR removeErr = CHIP_NO_ERROR; - if (removeError) { - removeErr = MTRErrorToCHIPErrorCode(removeError); - LogNSError("Failed to remove current fabric: ", removeError); - } else { - ChipLogProgress(chipTool, "Successfully unpaired deviceId %llu", mNodeId); - } - SetCommandExitStatus(removeErr); - }]; - }]; - } - }]; + queue:callbackQueue + completionHandler:^(MTRDevice * _Nullable device, NSError * _Nullable error) { + CHIP_ERROR err = CHIP_NO_ERROR; + if (error) { + err = MTRErrorToCHIPErrorCode(error); + LogNSError("Error: ", error); + SetCommandExitStatus(err); + } else if (device == nil) { + ChipLogError(chipTool, "Error: %s", chip::ErrorStr(CHIP_ERROR_INTERNAL)); + SetCommandExitStatus(CHIP_ERROR_INTERNAL); + } else { + ChipLogProgress(chipTool, "Attempting to unpair device %llu", mNodeId); + MTROperationalCredentials * opCredsCluster = [[MTROperationalCredentials alloc] initWithDevice:device + endpoint:0 + queue:callbackQueue]; + [opCredsCluster readAttributeCurrentFabricIndexWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable readError) { + if (readError) { + CHIP_ERROR readErr = MTRErrorToCHIPErrorCode(readError); + LogNSError("Failed to get current fabric: ", readError); + SetCommandExitStatus(readErr); + return; + } + MTROperationalCredentialsClusterRemoveFabricParams * params = + [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; + params.fabricIndex = value; + [opCredsCluster removeFabricWithParams:params + completionHandler:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable removeError) { + CHIP_ERROR removeErr = CHIP_NO_ERROR; + if (removeError) { + removeErr = MTRErrorToCHIPErrorCode(removeError); + LogNSError("Failed to remove current fabric: ", removeError); + } else { + ChipLogProgress(chipTool, "Successfully unpaired deviceId %llu", mNodeId); + } + SetCommandExitStatus(removeErr); + }]; + }]; + } + }]; } diff --git a/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm b/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm index 04d28646cb42af..2fe5da61f53d82 100644 --- a/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm +++ b/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm @@ -139,4 +139,6 @@ return CHIP_NO_ERROR; } -bool SetupPayloadParseCommand::IsQRCode(NSString * codeString) { return [codeString hasPrefix:@"MT:"]; } +bool SetupPayloadParseCommand::IsQRCode(NSString * codeString) { + return [codeString hasPrefix:@"MT:"]; +} diff --git a/examples/lighting-app/qpg/src/AppTask.cpp b/examples/lighting-app/qpg/src/AppTask.cpp index 13e526024c1edf..1991297319eade 100644 --- a/examples/lighting-app/qpg/src/AppTask.cpp +++ b/examples/lighting-app/qpg/src/AppTask.cpp @@ -586,7 +586,7 @@ void AppTask::UpdateClusterState(void) newValue = LightingMgr().GetLevel(); status = emberAfWriteAttribute(1, ZCL_LEVEL_CONTROL_CLUSTER_ID, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, (uint8_t *) &newValue, - ZCL_INT8U_ATTRIBUTE_TYPE); + ZCL_INT8U_ATTRIBUTE_TYPE); if (status != EMBER_ZCL_STATUS_SUCCESS) { diff --git a/examples/platform/efr32/FreeRTOSConfig.h b/examples/platform/efr32/FreeRTOSConfig.h index 3408b5667aa9bc..a1522f3e974990 100644 --- a/examples/platform/efr32/FreeRTOSConfig.h +++ b/examples/platform/efr32/FreeRTOSConfig.h @@ -198,9 +198,9 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ #ifndef configTOTAL_HEAP_SIZE #ifdef SL_WIFI -#define configTOTAL_HEAP_SIZE ((size_t)(30 * 1024)) +#define configTOTAL_HEAP_SIZE ((size_t) (30 * 1024)) #else -#define configTOTAL_HEAP_SIZE ((size_t)(20 * 1024)) +#define configTOTAL_HEAP_SIZE ((size_t) (20 * 1024)) #endif #endif // configTOTAL_HEAP_SIZE diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 1c7e4789223f59..6ab2e3f64d3b9c 100644 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -36,9 +36,9 @@ class Target: """Represents a build target: - Has a name identifier plus parameters on how to build it (what - builder class to use and what arguments are required to produce - the specified build) + Has a name identifier plus parameters on how to build it (what + builder class to use and what arguments are required to produce + the specified build) """ def __init__(self, name, builder_class, **kwargs): @@ -51,8 +51,7 @@ def __init__(self, name, builder_class, **kwargs): def Clone(self): """Creates a clone of self.""" - clone = Target(self.name, self.builder_class, - **self.create_kw_args.copy()) + clone = Target(self.name, self.builder_class, **self.create_kw_args.copy()) clone.glob_blacklist_reason = self.glob_blacklist_reason return clone @@ -68,10 +67,12 @@ def Extend(self, suffix, **kargs): clone.create_kw_args.update(kargs) return clone - def Create(self, runner, repository_path: str, output_prefix: str, - enable_flashbundle: bool): + def Create( + self, runner, repository_path: str, output_prefix: str, enable_flashbundle: bool + ): builder = self.builder_class( - repository_path, runner=runner, **self.create_kw_args) + repository_path, runner=runner, **self.create_kw_args + ) builder.target = self builder.identifier = self.name @@ -116,9 +117,14 @@ def Accept(self, name: str): class BuildVariant: - def __init__(self, name: str, validator=AcceptAnyName(), - conflicts: List[str] = [], requires: List[str] = [], - **buildargs): + def __init__( + self, + name: str, + validator=AcceptAnyName(), + conflicts: List[str] = [], + requires: List[str] = [], + **buildargs + ): self.name = name self.validator = validator self.conflicts = conflicts @@ -148,8 +154,7 @@ def AllRequirementsMet(items: List[BuildVariant]) -> bool: class VariantBuilder: - """Handles creating multiple build variants based on a starting target. - """ + """Handles creating multiple build variants based on a starting target.""" def __init__(self, targets: List[Target] = []): # note the clone in case the default arg is used @@ -188,8 +193,7 @@ def AllVariants(self): yield target # skip variants that do not work for this target - ok_variants = [ - v for v in self.variants if v.validator.Accept(target.name)] + ok_variants = [v for v in self.variants if v.validator.Accept(target.name)] # Build every possible variant for variant_count in range(1, len(ok_variants) + 1): @@ -204,14 +208,16 @@ def AllVariants(self): variant_target = target.Clone() for option in subgroup: variant_target = variant_target.Extend( - option.name, **option.buildargs) + option.name, **option.buildargs + ) # Only a few are whitelisted for globs - name = '-'.join([o.name for o in subgroup]) + name = "-".join([o.name for o in subgroup]) if name not in self.glob_whitelist: if not variant_target.IsGlobBlacklisted: variant_target = variant_target.GlobBlacklist( - 'Reduce default build variants') + "Reduce default build variants" + ) yield variant_target @@ -223,328 +229,535 @@ def HostTargets(): targets = [target_native] # x64 linux supports cross compile - cross_compile = (HostBoard.NATIVE.PlatformName() == 'linux') and (HostBoard.NATIVE.BoardName() != HostBoard.ARM64.BoardName()) + cross_compile = (HostBoard.NATIVE.PlatformName() == "linux") and ( + HostBoard.NATIVE.BoardName() != HostBoard.ARM64.BoardName() + ) if cross_compile: - targets.append(target.Extend('arm64', board=HostBoard.ARM64)) + targets.append(target.Extend("arm64", board=HostBoard.ARM64)) app_targets = [] # Don't cross compile some builds + app_targets.append(target_native.Extend("rpc-console", app=HostApp.RPC_CONSOLE)) app_targets.append( - target_native.Extend('rpc-console', app=HostApp.RPC_CONSOLE)) - app_targets.append( - target_native.Extend('nl-test-runner', app=HostApp.NL_TEST_RUNNER)) + target_native.Extend("nl-test-runner", app=HostApp.NL_TEST_RUNNER) + ) for target in targets: - app_targets.append(target.Extend( - 'all-clusters', app=HostApp.ALL_CLUSTERS)) - app_targets.append(target.Extend( - 'all-clusters-minimal', app=HostApp.ALL_CLUSTERS_MINIMAL)) - if (HostBoard.NATIVE.PlatformName() == 'darwin'): - app_targets.append(target.Extend( - 'darwin-framework-tool', app=HostApp.CHIP_TOOL_DARWIN)) - app_targets.append(target.Extend('chip-tool', app=HostApp.CHIP_TOOL)) - app_targets.append(target.Extend('thermostat', app=HostApp.THERMOSTAT)) - app_targets.append(target.Extend('minmdns', app=HostApp.MIN_MDNS)) - app_targets.append(target.Extend('light', app=HostApp.LIGHT)) - app_targets.append(target.Extend('light-rpc', app=HostApp.LIGHT, enable_rpcs=True)) - app_targets.append(target.Extend('lock', app=HostApp.LOCK)) - app_targets.append(target.Extend('shell', app=HostApp.SHELL)) - app_targets.append(target.Extend( - 'ota-provider', app=HostApp.OTA_PROVIDER, enable_ble=False)) - app_targets.append(target.Extend( - 'ota-requestor', app=HostApp.OTA_REQUESTOR, enable_ble=False)) - app_targets.append(target.Extend('python-bindings', app=HostApp.PYTHON_BINDINGS)) - app_targets.append(target.Extend('tv-app', app=HostApp.TV_APP)) - app_targets.append(target.Extend('tv-casting-app', app=HostApp.TV_CASTING)) - app_targets.append(target.Extend('bridge', app=HostApp.BRIDGE)) + app_targets.append(target.Extend("all-clusters", app=HostApp.ALL_CLUSTERS)) + app_targets.append( + target.Extend("all-clusters-minimal", app=HostApp.ALL_CLUSTERS_MINIMAL) + ) + if HostBoard.NATIVE.PlatformName() == "darwin": + app_targets.append( + target.Extend("darwin-framework-tool", app=HostApp.CHIP_TOOL_DARWIN) + ) + app_targets.append(target.Extend("chip-tool", app=HostApp.CHIP_TOOL)) + app_targets.append(target.Extend("thermostat", app=HostApp.THERMOSTAT)) + app_targets.append(target.Extend("minmdns", app=HostApp.MIN_MDNS)) + app_targets.append(target.Extend("light", app=HostApp.LIGHT)) + app_targets.append( + target.Extend("light-rpc", app=HostApp.LIGHT, enable_rpcs=True) + ) + app_targets.append(target.Extend("lock", app=HostApp.LOCK)) + app_targets.append(target.Extend("shell", app=HostApp.SHELL)) + app_targets.append( + target.Extend("ota-provider", app=HostApp.OTA_PROVIDER, enable_ble=False) + ) + app_targets.append( + target.Extend("ota-requestor", app=HostApp.OTA_REQUESTOR, enable_ble=False) + ) + app_targets.append( + target.Extend("python-bindings", app=HostApp.PYTHON_BINDINGS) + ) + app_targets.append(target.Extend("tv-app", app=HostApp.TV_APP)) + app_targets.append(target.Extend("tv-casting-app", app=HostApp.TV_CASTING)) + app_targets.append(target.Extend("bridge", app=HostApp.BRIDGE)) builder = VariantBuilder() # Possible build variants. Note that number of potential # builds is exponential here - builder.AppendVariant(name="same-event-loop", validator=AcceptNameWithSubstrings( - ['-chip-tool', '-darwin-framework-tool']), separate_event_loop=False), - builder.AppendVariant(name="no-interactive", validator=AcceptNameWithSubstrings( - ['-chip-tool']), interactive_mode=False), + builder.AppendVariant( + name="same-event-loop", + validator=AcceptNameWithSubstrings(["-chip-tool", "-darwin-framework-tool"]), + separate_event_loop=False, + ), + builder.AppendVariant( + name="no-interactive", + validator=AcceptNameWithSubstrings(["-chip-tool"]), + interactive_mode=False, + ), builder.AppendVariant(name="ipv6only", enable_ipv4=False), builder.AppendVariant(name="no-ble", enable_ble=False), builder.AppendVariant(name="no-wifi", enable_wifi=False), - builder.AppendVariant(name="tsan", conflicts=['asan'], use_tsan=True), - builder.AppendVariant(name="asan", conflicts=['tsan'], use_asan=True), - builder.AppendVariant(name="libfuzzer", requires=[ - "clang"], use_libfuzzer=True), + builder.AppendVariant(name="tsan", conflicts=["asan"], use_tsan=True), + builder.AppendVariant(name="asan", conflicts=["tsan"], use_asan=True), + builder.AppendVariant(name="libfuzzer", requires=["clang"], use_libfuzzer=True), builder.AppendVariant(name="clang", use_clang=True), builder.AppendVariant(name="test", extra_tests=True), - builder.WhitelistVariantNameForGlob('no-interactive-ipv6only') - builder.WhitelistVariantNameForGlob('ipv6only') + builder.WhitelistVariantNameForGlob("no-interactive-ipv6only") + builder.WhitelistVariantNameForGlob("ipv6only") for target in app_targets: - if ('-rpc-console' in target.name) or ('-python-bindings' in target.name) or ('nl-test-runner' in target.name): + if ( + ("-rpc-console" in target.name) + or ("-python-bindings" in target.name) + or ("nl-test-runner" in target.name) + ): # Single-variant builds yield target else: builder.targets.append(target) for target in builder.AllVariants(): - if cross_compile and 'chip-tool' in target.name and 'arm64' in target.name and '-no-interactive' not in target.name: + if ( + cross_compile + and "chip-tool" in target.name + and "arm64" in target.name + and "-no-interactive" not in target.name + ): # Interactive builds will not compile by default on arm cross compiles # because libreadline is not part of the default sysroot - yield target.GlobBlacklist('Arm crosscompile does not support libreadline-dev') + yield target.GlobBlacklist( + "Arm crosscompile does not support libreadline-dev" + ) else: yield target # Without extra build variants - yield target_native.Extend('chip-cert', app=HostApp.CERT_TOOL) - yield target_native.Extend('address-resolve-tool', app=HostApp.ADDRESS_RESOLVE) - yield target_native.Extend('address-resolve-tool-clang', app=HostApp.ADDRESS_RESOLVE, - use_clang=True).GlobBlacklist("Reduce default build variants") - yield target_native.Extend('address-resolve-tool-platform-mdns', app=HostApp.ADDRESS_RESOLVE, - use_platform_mdns=True).GlobBlacklist("Reduce default build variants") - yield target_native.Extend('address-resolve-tool-platform-mdns-ipv6only', app=HostApp.ADDRESS_RESOLVE, - use_platform_mdns=True, enable_ipv4=False).GlobBlacklist("Reduce default build variants") + yield target_native.Extend("chip-cert", app=HostApp.CERT_TOOL) + yield target_native.Extend("address-resolve-tool", app=HostApp.ADDRESS_RESOLVE) + yield target_native.Extend( + "address-resolve-tool-clang", app=HostApp.ADDRESS_RESOLVE, use_clang=True + ).GlobBlacklist("Reduce default build variants") + yield target_native.Extend( + "address-resolve-tool-platform-mdns", + app=HostApp.ADDRESS_RESOLVE, + use_platform_mdns=True, + ).GlobBlacklist("Reduce default build variants") + yield target_native.Extend( + "address-resolve-tool-platform-mdns-ipv6only", + app=HostApp.ADDRESS_RESOLVE, + use_platform_mdns=True, + enable_ipv4=False, + ).GlobBlacklist("Reduce default build variants") test_target = Target(HostBoard.NATIVE.PlatformName(), HostBuilder) for board in [HostBoard.NATIVE, HostBoard.FAKE]: - yield test_target.Extend(board.BoardName() + '-tests', board=board, app=HostApp.TESTS) - yield test_target.Extend(board.BoardName() + '-tests-clang', board=board, app=HostApp.TESTS, use_clang=True) + yield test_target.Extend( + board.BoardName() + "-tests", board=board, app=HostApp.TESTS + ) + yield test_target.Extend( + board.BoardName() + "-tests-clang", + board=board, + app=HostApp.TESTS, + use_clang=True, + ) def Esp32Targets(): - esp32_target = Target('esp32', Esp32Builder) - - yield esp32_target.Extend('m5stack-all-clusters', board=Esp32Board.M5Stack, app=Esp32App.ALL_CLUSTERS) - yield esp32_target.Extend('m5stack-all-clusters-ipv6only', board=Esp32Board.M5Stack, app=Esp32App.ALL_CLUSTERS, - enable_ipv4=False) - yield esp32_target.Extend('m5stack-all-clusters-rpc', board=Esp32Board.M5Stack, app=Esp32App.ALL_CLUSTERS, - enable_rpcs=True) - yield esp32_target.Extend('m5stack-all-clusters-rpc-ipv6only', board=Esp32Board.M5Stack, app=Esp32App.ALL_CLUSTERS, - enable_rpcs=True, enable_ipv4=False) - - yield esp32_target.Extend('m5stack-ota-requestor', board=Esp32Board.M5Stack, app=Esp32App.OTA_REQUESTOR) - yield esp32_target.Extend('m5stack-ota-requestor-rpc', board=Esp32Board.M5Stack, app=Esp32App.OTA_REQUESTOR, - enable_rpcs=True) - - yield esp32_target.Extend('c3devkit-all-clusters', board=Esp32Board.C3DevKit, app=Esp32App.ALL_CLUSTERS) - - yield esp32_target.Extend('m5stack-all-clusters-minimal', board=Esp32Board.M5Stack, app=Esp32App.ALL_CLUSTERS_MINIMAL) - yield esp32_target.Extend('m5stack-all-clusters-minimal-ipv6only', board=Esp32Board.M5Stack, app=Esp32App.ALL_CLUSTERS_MINIMAL, - enable_ipv4=False) - yield esp32_target.Extend('m5stack-all-clusters-minimal-rpc', board=Esp32Board.M5Stack, app=Esp32App.ALL_CLUSTERS_MINIMAL, - enable_rpcs=True) - yield esp32_target.Extend('m5stack-all-clusters-minimal-rpc-ipv6only', board=Esp32Board.M5Stack, app=Esp32App.ALL_CLUSTERS_MINIMAL, - enable_rpcs=True, enable_ipv4=False) - - yield esp32_target.Extend('c3devkit-all-clusters-minimal', board=Esp32Board.C3DevKit, app=Esp32App.ALL_CLUSTERS_MINIMAL) - - devkitc = esp32_target.Extend('devkitc', board=Esp32Board.DevKitC) - - yield devkitc.Extend('all-clusters', app=Esp32App.ALL_CLUSTERS) - yield devkitc.Extend('all-clusters-ipv6only', app=Esp32App.ALL_CLUSTERS, enable_ipv4=False) - yield devkitc.Extend('all-clusters-minimal', app=Esp32App.ALL_CLUSTERS_MINIMAL) - yield devkitc.Extend('all-clusters-minimal-ipv6only', app=Esp32App.ALL_CLUSTERS_MINIMAL, enable_ipv4=False) - yield devkitc.Extend('shell', app=Esp32App.SHELL) - yield devkitc.Extend('light', app=Esp32App.LIGHT) - yield devkitc.Extend('lock', app=Esp32App.LOCK) - yield devkitc.Extend('bridge', app=Esp32App.BRIDGE) - yield devkitc.Extend('temperature-measurement', app=Esp32App.TEMPERATURE_MEASUREMENT) - yield devkitc.Extend('temperature-measurement-rpc', app=Esp32App.TEMPERATURE_MEASUREMENT, enable_rpcs=True) - yield devkitc.Extend('ota-requestor', app=Esp32App.OTA_REQUESTOR) - yield devkitc.Extend('ota-requestor-rpc', app=Esp32App.OTA_REQUESTOR, enable_rpcs=True) - - yield esp32_target.Extend('qemu-tests', board=Esp32Board.QEMU, app=Esp32App.TESTS) + esp32_target = Target("esp32", Esp32Builder) + + yield esp32_target.Extend( + "m5stack-all-clusters", board=Esp32Board.M5Stack, app=Esp32App.ALL_CLUSTERS + ) + yield esp32_target.Extend( + "m5stack-all-clusters-ipv6only", + board=Esp32Board.M5Stack, + app=Esp32App.ALL_CLUSTERS, + enable_ipv4=False, + ) + yield esp32_target.Extend( + "m5stack-all-clusters-rpc", + board=Esp32Board.M5Stack, + app=Esp32App.ALL_CLUSTERS, + enable_rpcs=True, + ) + yield esp32_target.Extend( + "m5stack-all-clusters-rpc-ipv6only", + board=Esp32Board.M5Stack, + app=Esp32App.ALL_CLUSTERS, + enable_rpcs=True, + enable_ipv4=False, + ) + + yield esp32_target.Extend( + "m5stack-ota-requestor", board=Esp32Board.M5Stack, app=Esp32App.OTA_REQUESTOR + ) + yield esp32_target.Extend( + "m5stack-ota-requestor-rpc", + board=Esp32Board.M5Stack, + app=Esp32App.OTA_REQUESTOR, + enable_rpcs=True, + ) + + yield esp32_target.Extend( + "c3devkit-all-clusters", board=Esp32Board.C3DevKit, app=Esp32App.ALL_CLUSTERS + ) + + yield esp32_target.Extend( + "m5stack-all-clusters-minimal", + board=Esp32Board.M5Stack, + app=Esp32App.ALL_CLUSTERS_MINIMAL, + ) + yield esp32_target.Extend( + "m5stack-all-clusters-minimal-ipv6only", + board=Esp32Board.M5Stack, + app=Esp32App.ALL_CLUSTERS_MINIMAL, + enable_ipv4=False, + ) + yield esp32_target.Extend( + "m5stack-all-clusters-minimal-rpc", + board=Esp32Board.M5Stack, + app=Esp32App.ALL_CLUSTERS_MINIMAL, + enable_rpcs=True, + ) + yield esp32_target.Extend( + "m5stack-all-clusters-minimal-rpc-ipv6only", + board=Esp32Board.M5Stack, + app=Esp32App.ALL_CLUSTERS_MINIMAL, + enable_rpcs=True, + enable_ipv4=False, + ) + + yield esp32_target.Extend( + "c3devkit-all-clusters-minimal", + board=Esp32Board.C3DevKit, + app=Esp32App.ALL_CLUSTERS_MINIMAL, + ) + + devkitc = esp32_target.Extend("devkitc", board=Esp32Board.DevKitC) + + yield devkitc.Extend("all-clusters", app=Esp32App.ALL_CLUSTERS) + yield devkitc.Extend( + "all-clusters-ipv6only", app=Esp32App.ALL_CLUSTERS, enable_ipv4=False + ) + yield devkitc.Extend("all-clusters-minimal", app=Esp32App.ALL_CLUSTERS_MINIMAL) + yield devkitc.Extend( + "all-clusters-minimal-ipv6only", + app=Esp32App.ALL_CLUSTERS_MINIMAL, + enable_ipv4=False, + ) + yield devkitc.Extend("shell", app=Esp32App.SHELL) + yield devkitc.Extend("light", app=Esp32App.LIGHT) + yield devkitc.Extend("lock", app=Esp32App.LOCK) + yield devkitc.Extend("bridge", app=Esp32App.BRIDGE) + yield devkitc.Extend( + "temperature-measurement", app=Esp32App.TEMPERATURE_MEASUREMENT + ) + yield devkitc.Extend( + "temperature-measurement-rpc", + app=Esp32App.TEMPERATURE_MEASUREMENT, + enable_rpcs=True, + ) + yield devkitc.Extend("ota-requestor", app=Esp32App.OTA_REQUESTOR) + yield devkitc.Extend( + "ota-requestor-rpc", app=Esp32App.OTA_REQUESTOR, enable_rpcs=True + ) + + yield esp32_target.Extend("qemu-tests", board=Esp32Board.QEMU, app=Esp32App.TESTS) def Efr32Targets(): - efr_target = Target('efr32', Efr32Builder) + efr_target = Target("efr32", Efr32Builder) board_targets = [ - efr_target.Extend('brd4161a', board=Efr32Board.BRD4161A), - efr_target.Extend('brd4163a', board=Efr32Board.BRD4163A).GlobBlacklist( - 'only user requested'), - efr_target.Extend('brd4164a', board=Efr32Board.BRD4164A).GlobBlacklist( - 'only user requested'), - efr_target.Extend('brd4166a', board=Efr32Board.BRD4166A).GlobBlacklist( - 'only user requested'), - efr_target.Extend('brd4170a', board=Efr32Board.BRD4170A).GlobBlacklist( - 'only user requested'), - efr_target.Extend('brd4186a', board=Efr32Board.BRD4186A).GlobBlacklist( - 'only user requested'), - efr_target.Extend('brd4187a', board=Efr32Board.BRD4187A).GlobBlacklist( - 'only user requested'), - efr_target.Extend('brd4304a', board=Efr32Board.BRD4304A).GlobBlacklist( - 'only user requested') + efr_target.Extend("brd4161a", board=Efr32Board.BRD4161A), + efr_target.Extend("brd4163a", board=Efr32Board.BRD4163A).GlobBlacklist( + "only user requested" + ), + efr_target.Extend("brd4164a", board=Efr32Board.BRD4164A).GlobBlacklist( + "only user requested" + ), + efr_target.Extend("brd4166a", board=Efr32Board.BRD4166A).GlobBlacklist( + "only user requested" + ), + efr_target.Extend("brd4170a", board=Efr32Board.BRD4170A).GlobBlacklist( + "only user requested" + ), + efr_target.Extend("brd4186a", board=Efr32Board.BRD4186A).GlobBlacklist( + "only user requested" + ), + efr_target.Extend("brd4187a", board=Efr32Board.BRD4187A).GlobBlacklist( + "only user requested" + ), + efr_target.Extend("brd4304a", board=Efr32Board.BRD4304A).GlobBlacklist( + "only user requested" + ), ] builder = VariantBuilder() for board_target in board_targets: - builder.targets.append(board_target.Extend( - 'window-covering', app=Efr32App.WINDOW_COVERING)) - builder.targets.append(board_target.Extend( - 'switch', app=Efr32App.SWITCH)) - builder.targets.append(board_target.Extend( - 'unit-test', app=Efr32App.UNIT_TEST)) builder.targets.append( - board_target.Extend('light', app=Efr32App.LIGHT)) - builder.targets.append(board_target.Extend('lock', app=Efr32App.LOCK)) + board_target.Extend("window-covering", app=Efr32App.WINDOW_COVERING) + ) + builder.targets.append(board_target.Extend("switch", app=Efr32App.SWITCH)) + builder.targets.append(board_target.Extend("unit-test", app=Efr32App.UNIT_TEST)) + builder.targets.append(board_target.Extend("light", app=Efr32App.LIGHT)) + builder.targets.append(board_target.Extend("lock", app=Efr32App.LOCK)) # Possible build variants. Note that number of potential # builds is exponential here - builder.AppendVariant(name="rpc", validator=AcceptNameWithSubstrings( - ['-light', '-lock']), enable_rpcs=True) + builder.AppendVariant( + name="rpc", + validator=AcceptNameWithSubstrings(["-light", "-lock"]), + enable_rpcs=True, + ) builder.AppendVariant(name="with-ota-requestor", enable_ota_requestor=True) - builder.WhitelistVariantNameForGlob('rpc') + builder.WhitelistVariantNameForGlob("rpc") for target in builder.AllVariants(): yield target def NrfTargets(): - target = Target('nrf', NrfConnectBuilder) + target = Target("nrf", NrfConnectBuilder) - yield target.Extend('native-posix-64-tests', board=NrfBoard.NATIVE_POSIX_64, app=NrfApp.UNIT_TESTS) + yield target.Extend( + "native-posix-64-tests", board=NrfBoard.NATIVE_POSIX_64, app=NrfApp.UNIT_TESTS + ) targets = [ - target.Extend('nrf5340dk', board=NrfBoard.NRF5340DK), - target.Extend('nrf52840dk', board=NrfBoard.NRF52840DK), + target.Extend("nrf5340dk", board=NrfBoard.NRF5340DK), + target.Extend("nrf52840dk", board=NrfBoard.NRF52840DK), ] # Enable nrf52840dongle for all-clusters and lighting app only - yield target.Extend('nrf52840dongle-all-clusters', board=NrfBoard.NRF52840DONGLE, app=NrfApp.ALL_CLUSTERS) - yield target.Extend('nrf52840dongle-all-clusters-minimal', board=NrfBoard.NRF52840DONGLE, app=NrfApp.ALL_CLUSTERS_MINIMAL) - yield target.Extend('nrf52840dongle-light', board=NrfBoard.NRF52840DONGLE, app=NrfApp.LIGHT) + yield target.Extend( + "nrf52840dongle-all-clusters", + board=NrfBoard.NRF52840DONGLE, + app=NrfApp.ALL_CLUSTERS, + ) + yield target.Extend( + "nrf52840dongle-all-clusters-minimal", + board=NrfBoard.NRF52840DONGLE, + app=NrfApp.ALL_CLUSTERS_MINIMAL, + ) + yield target.Extend( + "nrf52840dongle-light", board=NrfBoard.NRF52840DONGLE, app=NrfApp.LIGHT + ) for target in targets: - yield target.Extend('all-clusters', app=NrfApp.ALL_CLUSTERS) - yield target.Extend('all-clusters-minimal', app=NrfApp.ALL_CLUSTERS_MINIMAL) - yield target.Extend('lock', app=NrfApp.LOCK) - yield target.Extend('light', app=NrfApp.LIGHT) - yield target.Extend('shell', app=NrfApp.SHELL) - yield target.Extend('pump', app=NrfApp.PUMP) - yield target.Extend('pump-controller', app=NrfApp.PUMP_CONTROLLER) + yield target.Extend("all-clusters", app=NrfApp.ALL_CLUSTERS) + yield target.Extend("all-clusters-minimal", app=NrfApp.ALL_CLUSTERS_MINIMAL) + yield target.Extend("lock", app=NrfApp.LOCK) + yield target.Extend("light", app=NrfApp.LIGHT) + yield target.Extend("shell", app=NrfApp.SHELL) + yield target.Extend("pump", app=NrfApp.PUMP) + yield target.Extend("pump-controller", app=NrfApp.PUMP_CONTROLLER) - rpc = target.Extend('light-rpc', app=NrfApp.LIGHT, enable_rpcs=True) + rpc = target.Extend("light-rpc", app=NrfApp.LIGHT, enable_rpcs=True) - if '-nrf5340dk-' in rpc.name: + if "-nrf5340dk-" in rpc.name: rpc = rpc.GlobBlacklist( - 'Compile failure due to pw_build args not forwarded to proto compiler. ' - 'https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/66760') + "Compile failure due to pw_build args not forwarded to proto compiler. " + "https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/66760" + ) yield rpc def AndroidTargets(): - target = Target('android', AndroidBuilder) - - yield target.Extend('arm-chip-tool', board=AndroidBoard.ARM, app=AndroidApp.CHIP_TOOL) - yield target.Extend('arm64-chip-tool', board=AndroidBoard.ARM64, app=AndroidApp.CHIP_TOOL) - yield target.Extend('x64-chip-tool', board=AndroidBoard.X64, app=AndroidApp.CHIP_TOOL) - yield target.Extend('x86-chip-tool', board=AndroidBoard.X86, app=AndroidApp.CHIP_TOOL) - yield target.Extend('arm64-chip-test', board=AndroidBoard.ARM64, app=AndroidApp.CHIP_TEST) - yield target.Extend('androidstudio-arm-chip-tool', board=AndroidBoard.AndroidStudio_ARM, app=AndroidApp.CHIP_TOOL) - yield target.Extend('androidstudio-arm64-chip-tool', board=AndroidBoard.AndroidStudio_ARM64, app=AndroidApp.CHIP_TOOL) - yield target.Extend('androidstudio-x86-chip-tool', board=AndroidBoard.AndroidStudio_X86, app=AndroidApp.CHIP_TOOL) - yield target.Extend('androidstudio-x64-chip-tool', board=AndroidBoard.AndroidStudio_X64, app=AndroidApp.CHIP_TOOL) - yield target.Extend('arm64-chip-tvserver', board=AndroidBoard.ARM64, app=AndroidApp.CHIP_TVServer) - yield target.Extend('arm-chip-tvserver', board=AndroidBoard.ARM, app=AndroidApp.CHIP_TVServer) - yield target.Extend('x86-chip-tvserver', board=AndroidBoard.X86, app=AndroidApp.CHIP_TVServer) - yield target.Extend('x64-chip-tvserver', board=AndroidBoard.X64, app=AndroidApp.CHIP_TVServer) - yield target.Extend('arm64-chip-tv-casting-app', board=AndroidBoard.ARM64, app=AndroidApp.CHIP_TV_CASTING_APP) - yield target.Extend('arm-chip-tv-casting-app', board=AndroidBoard.ARM, app=AndroidApp.CHIP_TV_CASTING_APP) + target = Target("android", AndroidBuilder) + + yield target.Extend( + "arm-chip-tool", board=AndroidBoard.ARM, app=AndroidApp.CHIP_TOOL + ) + yield target.Extend( + "arm64-chip-tool", board=AndroidBoard.ARM64, app=AndroidApp.CHIP_TOOL + ) + yield target.Extend( + "x64-chip-tool", board=AndroidBoard.X64, app=AndroidApp.CHIP_TOOL + ) + yield target.Extend( + "x86-chip-tool", board=AndroidBoard.X86, app=AndroidApp.CHIP_TOOL + ) + yield target.Extend( + "arm64-chip-test", board=AndroidBoard.ARM64, app=AndroidApp.CHIP_TEST + ) + yield target.Extend( + "androidstudio-arm-chip-tool", + board=AndroidBoard.AndroidStudio_ARM, + app=AndroidApp.CHIP_TOOL, + ) + yield target.Extend( + "androidstudio-arm64-chip-tool", + board=AndroidBoard.AndroidStudio_ARM64, + app=AndroidApp.CHIP_TOOL, + ) + yield target.Extend( + "androidstudio-x86-chip-tool", + board=AndroidBoard.AndroidStudio_X86, + app=AndroidApp.CHIP_TOOL, + ) + yield target.Extend( + "androidstudio-x64-chip-tool", + board=AndroidBoard.AndroidStudio_X64, + app=AndroidApp.CHIP_TOOL, + ) + yield target.Extend( + "arm64-chip-tvserver", board=AndroidBoard.ARM64, app=AndroidApp.CHIP_TVServer + ) + yield target.Extend( + "arm-chip-tvserver", board=AndroidBoard.ARM, app=AndroidApp.CHIP_TVServer + ) + yield target.Extend( + "x86-chip-tvserver", board=AndroidBoard.X86, app=AndroidApp.CHIP_TVServer + ) + yield target.Extend( + "x64-chip-tvserver", board=AndroidBoard.X64, app=AndroidApp.CHIP_TVServer + ) + yield target.Extend( + "arm64-chip-tv-casting-app", + board=AndroidBoard.ARM64, + app=AndroidApp.CHIP_TV_CASTING_APP, + ) + yield target.Extend( + "arm-chip-tv-casting-app", + board=AndroidBoard.ARM, + app=AndroidApp.CHIP_TV_CASTING_APP, + ) def MbedTargets(): - target = Target('mbed', MbedBuilder) + target = Target("mbed", MbedBuilder) targets = [ - target.Extend('CY8CPROTO_062_4343W', - board=MbedBoard.CY8CPROTO_062_4343W), + target.Extend("CY8CPROTO_062_4343W", board=MbedBoard.CY8CPROTO_062_4343W), ] app_targets = [] for target in targets: - app_targets.append(target.Extend('lock', app=MbedApp.LOCK)) - app_targets.append(target.Extend('light', app=MbedApp.LIGHT)) - app_targets.append(target.Extend( - 'all-clusters', app=MbedApp.ALL_CLUSTERS)) - app_targets.append(target.Extend( - 'all-clusters-minimal', app=MbedApp.ALL_CLUSTERS_MINIMAL)) - app_targets.append(target.Extend('pigweed', app=MbedApp.PIGWEED)) - app_targets.append(target.Extend('shell', app=MbedApp.SHELL)) + app_targets.append(target.Extend("lock", app=MbedApp.LOCK)) + app_targets.append(target.Extend("light", app=MbedApp.LIGHT)) + app_targets.append(target.Extend("all-clusters", app=MbedApp.ALL_CLUSTERS)) + app_targets.append( + target.Extend("all-clusters-minimal", app=MbedApp.ALL_CLUSTERS_MINIMAL) + ) + app_targets.append(target.Extend("pigweed", app=MbedApp.PIGWEED)) + app_targets.append(target.Extend("shell", app=MbedApp.SHELL)) for target in app_targets: - yield target.Extend('release', profile=MbedProfile.RELEASE) - yield target.Extend('develop', profile=MbedProfile.DEVELOP).GlobBlacklist( - 'Compile only for debugging purpose - ' - 'https://os.mbed.com/docs/mbed-os/latest/program-setup/build-profiles-and-rules.html') - yield target.Extend('debug', profile=MbedProfile.DEBUG).GlobBlacklist( - 'Compile only for debugging purpose - ' - 'https://os.mbed.com/docs/mbed-os/latest/program-setup/build-profiles-and-rules.html') + yield target.Extend("release", profile=MbedProfile.RELEASE) + yield target.Extend("develop", profile=MbedProfile.DEVELOP).GlobBlacklist( + "Compile only for debugging purpose - " + "https://os.mbed.com/docs/mbed-os/latest/program-setup/build-profiles-and-rules.html" + ) + yield target.Extend("debug", profile=MbedProfile.DEBUG).GlobBlacklist( + "Compile only for debugging purpose - " + "https://os.mbed.com/docs/mbed-os/latest/program-setup/build-profiles-and-rules.html" + ) def InfineonTargets(): - target = Target('infineon', InfineonBuilder) + target = Target("infineon", InfineonBuilder) - yield target.Extend('p6-lock', board=InfineonBoard.P6BOARD, app=InfineonApp.LOCK) - yield target.Extend('p6-all-clusters', board=InfineonBoard.P6BOARD, app=InfineonApp.ALL_CLUSTERS) - yield target.Extend('p6-all-clusters-minimal', board=InfineonBoard.P6BOARD, app=InfineonApp.ALL_CLUSTERS_MINIMAL) - yield target.Extend('p6-light', board=InfineonBoard.P6BOARD, app=InfineonApp.LIGHT) + yield target.Extend("p6-lock", board=InfineonBoard.P6BOARD, app=InfineonApp.LOCK) + yield target.Extend( + "p6-all-clusters", board=InfineonBoard.P6BOARD, app=InfineonApp.ALL_CLUSTERS + ) + yield target.Extend( + "p6-all-clusters-minimal", + board=InfineonBoard.P6BOARD, + app=InfineonApp.ALL_CLUSTERS_MINIMAL, + ) + yield target.Extend("p6-light", board=InfineonBoard.P6BOARD, app=InfineonApp.LIGHT) def AmebaTargets(): - ameba_target = Target('ameba', AmebaBuilder) - - yield ameba_target.Extend('amebad-all-clusters', board=AmebaBoard.AMEBAD, app=AmebaApp.ALL_CLUSTERS) - yield ameba_target.Extend('amebad-all-clusters-minimal', board=AmebaBoard.AMEBAD, app=AmebaApp.ALL_CLUSTERS_MINIMAL) - yield ameba_target.Extend('amebad-light', board=AmebaBoard.AMEBAD, app=AmebaApp.LIGHT) - yield ameba_target.Extend('amebad-pigweed', board=AmebaBoard.AMEBAD, app=AmebaApp.PIGWEED) + ameba_target = Target("ameba", AmebaBuilder) + + yield ameba_target.Extend( + "amebad-all-clusters", board=AmebaBoard.AMEBAD, app=AmebaApp.ALL_CLUSTERS + ) + yield ameba_target.Extend( + "amebad-all-clusters-minimal", + board=AmebaBoard.AMEBAD, + app=AmebaApp.ALL_CLUSTERS_MINIMAL, + ) + yield ameba_target.Extend( + "amebad-light", board=AmebaBoard.AMEBAD, app=AmebaApp.LIGHT + ) + yield ameba_target.Extend( + "amebad-pigweed", board=AmebaBoard.AMEBAD, app=AmebaApp.PIGWEED + ) def K32WTargets(): - target = Target('k32w', K32WBuilder) - - yield target.Extend('light-ota-se', app=K32WApp.LIGHT, release=True, disable_ble=True, se05x=True).GlobBlacklist("Only on demand build") - yield target.Extend('light-release-no-ota', app=K32WApp.LIGHT, tokenizer=True, disable_ota=True, release=True) - yield target.Extend('shell-release', app=K32WApp.SHELL, release=True) - yield target.Extend('lock-release', app=K32WApp.LOCK, release=True) - yield target.Extend('lock-low-power-release', app=K32WApp.LOCK, - low_power=True, release=True).GlobBlacklist("Only on demand build") + target = Target("k32w", K32WBuilder) + + yield target.Extend( + "light-ota-se", app=K32WApp.LIGHT, release=True, disable_ble=True, se05x=True + ).GlobBlacklist("Only on demand build") + yield target.Extend( + "light-release-no-ota", + app=K32WApp.LIGHT, + tokenizer=True, + disable_ota=True, + release=True, + ) + yield target.Extend("shell-release", app=K32WApp.SHELL, release=True) + yield target.Extend("lock-release", app=K32WApp.LOCK, release=True) + yield target.Extend( + "lock-low-power-release", app=K32WApp.LOCK, low_power=True, release=True + ).GlobBlacklist("Only on demand build") def cc13x2x7_26x2x7Targets(): - target = Target('cc13x2x7_26x2x7', cc13x2x7_26x2x7Builder) + target = Target("cc13x2x7_26x2x7", cc13x2x7_26x2x7Builder) - yield target.Extend('lock-ftd', app=cc13x2x7_26x2x7App.LOCK, openthread_ftd=True) - yield target.Extend('lock-mtd', app=cc13x2x7_26x2x7App.LOCK, openthread_ftd=False) - yield target.Extend('pump', app=cc13x2x7_26x2x7App.PUMP) - yield target.Extend('pump-controller', app=cc13x2x7_26x2x7App.PUMP_CONTROLLER) - yield target.Extend('all-clusters', app=cc13x2x7_26x2x7App.ALL_CLUSTERS) - yield target.Extend('all-clusters-minimal', app=cc13x2x7_26x2x7App.ALL_CLUSTERS_MINIMAL) - yield target.Extend('shell', app=cc13x2x7_26x2x7App.SHELL) + yield target.Extend("lock-ftd", app=cc13x2x7_26x2x7App.LOCK, openthread_ftd=True) + yield target.Extend("lock-mtd", app=cc13x2x7_26x2x7App.LOCK, openthread_ftd=False) + yield target.Extend("pump", app=cc13x2x7_26x2x7App.PUMP) + yield target.Extend("pump-controller", app=cc13x2x7_26x2x7App.PUMP_CONTROLLER) + yield target.Extend("all-clusters", app=cc13x2x7_26x2x7App.ALL_CLUSTERS) + yield target.Extend( + "all-clusters-minimal", app=cc13x2x7_26x2x7App.ALL_CLUSTERS_MINIMAL + ) + yield target.Extend("shell", app=cc13x2x7_26x2x7App.SHELL) def Cyw30739Targets(): - yield Target('cyw30739-cyw930739m2evb_01-light', Cyw30739Builder, - board=Cyw30739Board.CYW930739M2EVB_01, app=Cyw30739App.LIGHT) - yield Target('cyw30739-cyw930739m2evb_01-lock', Cyw30739Builder, - board=Cyw30739Board.CYW930739M2EVB_01, app=Cyw30739App.LOCK) - yield Target('cyw30739-cyw930739m2evb_01-ota-requestor', Cyw30739Builder, - board=Cyw30739Board.CYW930739M2EVB_01, app=Cyw30739App.OTA_REQUESTOR).GlobBlacklist( - "Running out of XIP flash space") - yield Target('cyw30739-cyw930739m2evb_01-ota-requestor-no-progress-logging', Cyw30739Builder, - board=Cyw30739Board.CYW930739M2EVB_01, app=Cyw30739App.OTA_REQUESTOR, progress_logging=False) + yield Target( + "cyw30739-cyw930739m2evb_01-light", + Cyw30739Builder, + board=Cyw30739Board.CYW930739M2EVB_01, + app=Cyw30739App.LIGHT, + ) + yield Target( + "cyw30739-cyw930739m2evb_01-lock", + Cyw30739Builder, + board=Cyw30739Board.CYW930739M2EVB_01, + app=Cyw30739App.LOCK, + ) + yield Target( + "cyw30739-cyw930739m2evb_01-ota-requestor", + Cyw30739Builder, + board=Cyw30739Board.CYW930739M2EVB_01, + app=Cyw30739App.OTA_REQUESTOR, + ).GlobBlacklist("Running out of XIP flash space") + yield Target( + "cyw30739-cyw930739m2evb_01-ota-requestor-no-progress-logging", + Cyw30739Builder, + board=Cyw30739Board.CYW930739M2EVB_01, + app=Cyw30739App.OTA_REQUESTOR, + progress_logging=False, + ) def QorvoTargets(): - target = Target('qpg', QpgBuilder) + target = Target("qpg", QpgBuilder) - yield target.Extend('lock', board=QpgBoard.QPG6105, app=QpgApp.LOCK) - yield target.Extend('light', board=QpgBoard.QPG6105, app=QpgApp.LIGHT) - yield target.Extend('shell', board=QpgBoard.QPG6105, app=QpgApp.SHELL) - yield target.Extend('persistent-storage', board=QpgBoard.QPG6105, app=QpgApp.PERSISTENT_STORAGE) + yield target.Extend("lock", board=QpgBoard.QPG6105, app=QpgApp.LOCK) + yield target.Extend("light", board=QpgBoard.QPG6105, app=QpgApp.LIGHT) + yield target.Extend("shell", board=QpgBoard.QPG6105, app=QpgApp.SHELL) + yield target.Extend( + "persistent-storage", board=QpgBoard.QPG6105, app=QpgApp.PERSISTENT_STORAGE + ) def TizenTargets(): @@ -556,36 +769,44 @@ def TizenTargets(): builder.AppendVariant(name="no-wifi", enable_wifi=False) builder.AppendVariant(name="asan", use_asan=True) - target = Target('tizen-arm', TizenBuilder, board=TizenBoard.ARM) + target = Target("tizen-arm", TizenBuilder, board=TizenBoard.ARM) - builder.targets.append(target.Extend('chip-tool', app=TizenApp.CHIP_TOOL)) - builder.targets.append(target.Extend('light', app=TizenApp.LIGHT)) + builder.targets.append(target.Extend("chip-tool", app=TizenApp.CHIP_TOOL)) + builder.targets.append(target.Extend("light", app=TizenApp.LIGHT)) for target in builder.AllVariants(): yield target def Bl602Targets(): - target = Target('bl602', Bl602Builder) + target = Target("bl602", Bl602Builder) - yield target.Extend('light', board=Bl602Board.BL602BOARD, app=Bl602App.LIGHT) + yield target.Extend("light", board=Bl602Board.BL602BOARD, app=Bl602App.LIGHT) def IMXTargets(): - target = Target('imx', IMXBuilder) - - yield target.Extend('chip-tool', app=IMXApp.CHIP_TOOL) - yield target.Extend('lighting-app', app=IMXApp.LIGHT) - yield target.Extend('thermostat', app=IMXApp.THERMOSTAT) - yield target.Extend('all-clusters-app', app=IMXApp.ALL_CLUSTERS) - yield target.Extend('all-clusters-minimal-app', app=IMXApp.ALL_CLUSTERS_MINIMAL) - yield target.Extend('ota-provider-app', app=IMXApp.OTA_PROVIDER) - yield target.Extend('chip-tool-release', app=IMXApp.CHIP_TOOL, release=True) - yield target.Extend('lighting-app-release', app=IMXApp.LIGHT, release=True) - yield target.Extend('thermostat-release', app=IMXApp.THERMOSTAT, release=True) - yield target.Extend('all-clusters-app-release', app=IMXApp.ALL_CLUSTERS, release=True) - yield target.Extend('all-clusters-minimal-app-release', app=IMXApp.ALL_CLUSTERS_MINIMAL, release=True) - yield target.Extend('ota-provider-app-release', app=IMXApp.OTA_PROVIDER, release=True) + target = Target("imx", IMXBuilder) + + yield target.Extend("chip-tool", app=IMXApp.CHIP_TOOL) + yield target.Extend("lighting-app", app=IMXApp.LIGHT) + yield target.Extend("thermostat", app=IMXApp.THERMOSTAT) + yield target.Extend("all-clusters-app", app=IMXApp.ALL_CLUSTERS) + yield target.Extend("all-clusters-minimal-app", app=IMXApp.ALL_CLUSTERS_MINIMAL) + yield target.Extend("ota-provider-app", app=IMXApp.OTA_PROVIDER) + yield target.Extend("chip-tool-release", app=IMXApp.CHIP_TOOL, release=True) + yield target.Extend("lighting-app-release", app=IMXApp.LIGHT, release=True) + yield target.Extend("thermostat-release", app=IMXApp.THERMOSTAT, release=True) + yield target.Extend( + "all-clusters-app-release", app=IMXApp.ALL_CLUSTERS, release=True + ) + yield target.Extend( + "all-clusters-minimal-app-release", + app=IMXApp.ALL_CLUSTERS_MINIMAL, + release=True, + ) + yield target.Extend( + "ota-provider-app-release", app=IMXApp.OTA_PROVIDER, release=True + ) ALL = [] @@ -613,10 +834,22 @@ def IMXTargets(): ALL.append(target) # Simple targets added one by one -ALL.append(Target('telink-tlsr9518adk80d-light', TelinkBuilder, - board=TelinkBoard.TLSR9518ADK80D, app=TelinkApp.LIGHT)) -ALL.append(Target('telink-tlsr9518adk80d-light-switch', TelinkBuilder, - board=TelinkBoard.TLSR9518ADK80D, app=TelinkApp.SWITCH)) +ALL.append( + Target( + "telink-tlsr9518adk80d-light", + TelinkBuilder, + board=TelinkBoard.TLSR9518ADK80D, + app=TelinkApp.LIGHT, + ) +) +ALL.append( + Target( + "telink-tlsr9518adk80d-light-switch", + TelinkBuilder, + board=TelinkBoard.TLSR9518ADK80D, + app=TelinkApp.SWITCH, + ) +) # have a consistent order overall ALL.sort(key=lambda t: t.name) diff --git a/scripts/idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp b/scripts/idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp index 1b1b091ef91d2b..c884b5f799e5e5 100644 --- a/scripts/idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp +++ b/scripts/idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp @@ -28,28 +28,45 @@ JNI_METHOD(jlong, DemoClusterCluster, initWithDevice)(JNIEnv * env, jobject self { chip::DeviceLayer::StackLock lock; DeviceProxy * device = reinterpret_cast(devicePtr); - DemoClusterCluster * cppCluster = new DemoClusterCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); + DemoClusterCluster * cppCluster = + new DemoClusterCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, DemoClusterCluster, subscribeArmFailsafesAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, DemoClusterCluster, subscribeArmFailsafesAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { - chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + chip::DeviceLayer::StackLock lock; + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; DemoClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); using TypeInfo = chip::app::Clusters::DemoCluster::Attributes::ArmFailsafes::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), CHIPDemoClusterArmFailsafesAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPDemoClusterArmFailsafesAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); diff --git a/scripts/idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp b/scripts/idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp index cc3f8d87d5790a..4ed0e771a2cf4a 100644 --- a/scripts/idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp +++ b/scripts/idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp @@ -28,28 +28,45 @@ JNI_METHOD(jlong, DemoClusterCluster, initWithDevice)(JNIEnv * env, jobject self { chip::DeviceLayer::StackLock lock; DeviceProxy * device = reinterpret_cast(devicePtr); - DemoClusterCluster * cppCluster = new DemoClusterCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); + DemoClusterCluster * cppCluster = + new DemoClusterCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, DemoClusterCluster, subscribeSomeLabelsAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, DemoClusterCluster, subscribeSomeLabelsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { - chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; DemoClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); using TypeInfo = chip::app::Clusters::DemoCluster::Attributes::SomeLabels::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), CHIPDemoClusterSomeLabelsAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPDemoClusterSomeLabelsAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); diff --git a/scripts/idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp b/scripts/idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp index e984b0bd176753..d6972b8e07e37e 100644 --- a/scripts/idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp +++ b/scripts/idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp @@ -28,50 +28,66 @@ JNI_METHOD(jlong, MyClusterCluster, initWithDevice)(JNIEnv * env, jobject self, { chip::DeviceLayer::StackLock lock; DeviceProxy * device = reinterpret_cast(devicePtr); - MyClusterCluster * cppCluster = new MyClusterCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); + MyClusterCluster * cppCluster = + new MyClusterCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, MyClusterCluster, - foo)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback,jobject argument,jobject timedInvokeTimeoutMs) +JNI_METHOD(void, MyClusterCluster, foo) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject argument, jobject timedInvokeTimeoutMs) { chip::DeviceLayer::StackLock lock; CHIP_ERROR err = CHIP_NO_ERROR; MyClusterCluster * cppCluster; - + ListFreer listFreer; chip::app::Clusters::MyCluster::Commands::Foo::Type request; std::vector> cleanupByteArrays; - std::vector> cleanupStrings;{ - jobject optionalValue_0 = nullptr; - chip::JniReferences::GetInstance().GetOptionalValue(argument, optionalValue_0); - if (optionalValue_0) { - auto & definedValue_0 = request.argument.Emplace(); - cleanupByteArrays.push_back(chip::Platform::MakeUnique(env, static_cast(optionalValue_0))); - definedValue_0 = cleanupByteArrays.back()->byteSpan(); + std::vector> cleanupStrings; + { + jobject optionalValue_0 = nullptr; + chip::JniReferences::GetInstance().GetOptionalValue(argument, optionalValue_0); + if (optionalValue_0) + { + auto & definedValue_0 = request.argument.Emplace(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_0))); + definedValue_0 = cleanupByteArrays.back()->byteSpan(); + } } - } - std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); - std::unique_ptr onFailure(Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); - VerifyOrReturn(onFailure.get() != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + VerifyOrReturn(onFailure.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + VerifyOrReturn(cppCluster != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - if (timedInvokeTimeoutMs == nullptr) { + if (timedInvokeTimeoutMs == nullptr) + { err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } else { - err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); } - VerifyOrReturn(err == CHIP_NO_ERROR, AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", CHIP_ERROR_INCORRECT_STATE)); + else + { + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedInvokeTimeoutMs)); + } + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); onSuccess.release(); onFailure.release(); diff --git a/scripts/idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp b/scripts/idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp index 1837cc6de068c8..6740a1b99f06f5 100644 --- a/scripts/idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp +++ b/scripts/idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp @@ -27,29 +27,44 @@ using namespace chip::Controller; JNI_METHOD(jlong, FirstCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - DeviceProxy * device = reinterpret_cast(devicePtr); + DeviceProxy * device = reinterpret_cast(devicePtr); FirstCluster * cppCluster = new FirstCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, FirstCluster, subscribeSomeIntegerAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, FirstCluster, subscribeSomeIntegerAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { - chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; FirstCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); using TypeInfo = chip::app::Clusters::First::Attributes::SomeInteger::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), CHIPInt16uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); diff --git a/scripts/idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp b/scripts/idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp index 22d4d2ed55aae6..dd78cb7cf66716 100644 --- a/scripts/idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp +++ b/scripts/idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp @@ -27,29 +27,43 @@ using namespace chip::Controller; JNI_METHOD(jlong, SecondCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - DeviceProxy * device = reinterpret_cast(devicePtr); + DeviceProxy * device = reinterpret_cast(devicePtr); SecondCluster * cppCluster = new SecondCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, SecondCluster, subscribeSomeBytesAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, SecondCluster, subscribeSomeBytesAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { - chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; SecondCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); using TypeInfo = chip::app::Clusters::Second::Attributes::SomeBytes::TypeInfo; auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), CHIPOctetStringAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPOctetStringAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); diff --git a/scripts/idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp b/scripts/idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp index 0e3f87807203b4..e0ea282e803e54 100644 --- a/scripts/idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp +++ b/scripts/idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp @@ -27,29 +27,43 @@ using namespace chip::Controller; JNI_METHOD(jlong, ThirdCluster, initWithDevice)(JNIEnv * env, jobject self, jlong devicePtr, jint endpointId) { chip::DeviceLayer::StackLock lock; - DeviceProxy * device = reinterpret_cast(devicePtr); + DeviceProxy * device = reinterpret_cast(devicePtr); ThirdCluster * cppCluster = new ThirdCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, ThirdCluster, subscribeSomeEnumAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, ThirdCluster, subscribeSomeEnumAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { - chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; ThirdCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); using TypeInfo = chip::app::Clusters::Third::Attributes::SomeEnum::TypeInfo; auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), CHIPInt8uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt8uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); diff --git a/scripts/idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp b/scripts/idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp index 88f214f58b716a..2bbb73337e54b1 100644 --- a/scripts/idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp +++ b/scripts/idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp @@ -28,28 +28,44 @@ JNI_METHOD(jlong, MyClusterCluster, initWithDevice)(JNIEnv * env, jobject self, { chip::DeviceLayer::StackLock lock; DeviceProxy * device = reinterpret_cast(devicePtr); - MyClusterCluster * cppCluster = new MyClusterCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); + MyClusterCluster * cppCluster = + new MyClusterCluster(*device->GetExchangeManager(), device->GetSecureSession().Value(), endpointId); return reinterpret_cast(cppCluster); } -JNI_METHOD(void, MyClusterCluster, subscribeClusterAttrAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) +JNI_METHOD(void, MyClusterCluster, subscribeClusterAttrAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { - chip::DeviceLayer::StackLock lock;std::unique_ptr onSuccess(Platform::New(callback, true), chip::Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + chip::DeviceLayer::StackLock lock; + std::unique_ptr onSuccess( + Platform::New(callback, true), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - std::unique_ptr onFailure(Platform::New(callback), chip::Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + std::unique_ptr onFailure( + Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; MyClusterCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); using TypeInfo = chip::app::Clusters::MyCluster::Attributes::ClusterAttr::TypeInfo; - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), CHIPInt16uAttributeCallback::OnSubscriptionEstablished); - VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error subscribing to attribute", err)); + err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, + static_cast(minInterval), static_cast(maxInterval), + CHIPInt16uAttributeCallback::OnSubscriptionEstablished); + VerifyOrReturn(err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error subscribing to attribute", err)); onSuccess.release(); onFailure.release(); diff --git a/scripts/tools/check_includes_config.py b/scripts/tools/check_includes_config.py index 2dffe78715f760..cec5327098d1bd 100644 --- a/scripts/tools/check_includes_config.py +++ b/scripts/tools/check_includes_config.py @@ -25,73 +25,69 @@ # un-anchored and case sensitive. IGNORE: Set[str] = { - - '/examples/', - '/java/', - '/Jni', - '/pybindings/', - '/python/', - '/Test', - '/tests/', - '/tools/', - + "/examples/", + "/java/", + "/Jni", + "/pybindings/", + "/python/", + "/Test", + "/tests/", + "/tools/", # Platforms can opt in or out. - '/darwin/', - '/platform/Ameba/', - '/platform/android/', - '/platform/CYW30739/', - '/platform/Darwin/', - '/platform/EFR32/', - '/platform/ESP32/', - '/platform/fake/', - '/platform/Linux/', - '/platform/nxp/', - '/platform/Tizen/', - '/platform/P6/', - '/platform/bouffalolab/BL602', - '/platform/webos/', - r'POSIX\.h$', + "/darwin/", + "/platform/Ameba/", + "/platform/android/", + "/platform/CYW30739/", + "/platform/Darwin/", + "/platform/EFR32/", + "/platform/ESP32/", + "/platform/fake/", + "/platform/Linux/", + "/platform/nxp/", + "/platform/Tizen/", + "/platform/P6/", + "/platform/bouffalolab/BL602", + "/platform/webos/", + r"POSIX\.h$", } # DENY lists disallowed include files. DENY: Set[str] = { - # C++ headers often unsuitable for small platforms. - 'chrono', - 'clocale', - 'coroutine', - 'deque', - 'exception', - 'forward_list', - 'fstream', - 'iomanip', - 'ios', - 'iostream', - 'istream', - 'list', - 'locale', - 'locale.h', - 'map', - 'multimap', - 'multiset', - 'ostream', - 'queue', - 'set', - 'sstream', - 'stdexcept', - 'streambuf', - 'string', - 'string_view', - 'syncstream', - 'unordered_map', - 'unordered_set', - 'vector', - + "chrono", + "clocale", + "coroutine", + "deque", + "exception", + "forward_list", + "fstream", + "iomanip", + "ios", + "iostream", + "istream", + "list", + "locale", + "locale.h", + "map", + "multimap", + "multiset", + "ostream", + "queue", + "set", + "sstream", + "stdexcept", + "streambuf", + "string", + "string_view", + "syncstream", + "unordered_map", + "unordered_set", + "vector", # CHIP headers using STL containers. - 'lib/support/CHIPListUtils.h', # uses std::set - 'src/platform/DeviceSafeQueue.h', # uses std::deque + "lib/support/CHIPListUtils.h", # uses std::set + "src/platform/DeviceSafeQueue.h", # uses std::deque } @@ -102,52 +98,46 @@ # despite being in DENY. ALLOW: Dict[str, Set[str]] = { - # Not intended for embedded clients (#11705). - 'src/app/ClusterStateCache.h': {'list', 'map', 'set', 'vector', 'queue'}, - 'src/app/BufferedReadCallback.h': {'vector'}, - 'src/lib/support/IniEscaping.cpp': {'string'}, - 'src/lib/support/IniEscaping.h': {'string'}, - + "src/app/ClusterStateCache.h": {"list", "map", "set", "vector", "queue"}, + "src/app/BufferedReadCallback.h": {"vector"}, + "src/lib/support/IniEscaping.cpp": {"string"}, + "src/lib/support/IniEscaping.h": {"string"}, # Itself in DENY. - 'src/lib/support/CHIPListUtils.h': {'set'}, - 'src/platform/DeviceSafeQueue.h': {'queue'}, - + "src/lib/support/CHIPListUtils.h": {"set"}, + "src/platform/DeviceSafeQueue.h": {"queue"}, # Only uses for zero-cost types. - 'src/system/SystemClock.h': {'chrono'}, - 'src/platform/mbed/MbedEventTimeout.h': {'chrono'}, - - 'src/app/app-platform/ContentApp.h': {'list', 'string'}, - 'src/app/clusters/application-basic-server/application-basic-delegate.h': {'list'}, - 'src/app/clusters/application-basic-server/application-basic-server.cpp': {'list'}, - 'src/app/clusters/application-launcher-server/application-launcher-delegate.h': {'list'}, - 'src/app/clusters/audio-output-server/audio-output-delegate.h': {'list'}, - 'src/app/clusters/channel-server/channel-delegate.h': {'list'}, - 'src/app/clusters/content-launch-server/content-launch-delegate.h': {'list'}, - 'src/app/clusters/content-launch-server/content-launch-server.cpp': {'list'}, - 'src/app/clusters/media-input-server/media-input-delegate.h': {'list'}, - 'src/app/clusters/media-playback-server/media-playback-delegate.h': {'list'}, - 'src/app/clusters/target-navigator-server/target-navigator-delegate.h': {'list'}, - - 'src/credentials/attestation_verifier/FileAttestationTrustStore.h': {'vector'}, - 'src/credentials/attestation_verifier/FileAttestationTrustStore.cpp': {'string'}, - - 'src/setup_payload/AdditionalDataPayload.h': {'string'}, - 'src/setup_payload/AdditionalDataPayloadParser.cpp': {'vector'}, - 'src/setup_payload/Base38Decode.h': {'string', 'vector'}, - 'src/setup_payload/ManualSetupPayloadGenerator.h': {'string'}, - 'src/setup_payload/ManualSetupPayloadParser.cpp': {'string', 'vector'}, - 'src/setup_payload/ManualSetupPayloadParser.h': {'string'}, - 'src/setup_payload/QRCodeSetupPayloadParser.cpp': {'vector'}, - 'src/setup_payload/QRCodeSetupPayloadParser.h': {'string'}, - 'src/setup_payload/SetupPayloadHelper.cpp': {'fstream'}, - 'src/setup_payload/SetupPayloadHelper.h': {'string'}, - 'src/setup_payload/SetupPayload.h': {'map', 'string', 'vector'}, - + "src/system/SystemClock.h": {"chrono"}, + "src/platform/mbed/MbedEventTimeout.h": {"chrono"}, + "src/app/app-platform/ContentApp.h": {"list", "string"}, + "src/app/clusters/application-basic-server/application-basic-delegate.h": {"list"}, + "src/app/clusters/application-basic-server/application-basic-server.cpp": {"list"}, + "src/app/clusters/application-launcher-server/application-launcher-delegate.h": { + "list" + }, + "src/app/clusters/audio-output-server/audio-output-delegate.h": {"list"}, + "src/app/clusters/channel-server/channel-delegate.h": {"list"}, + "src/app/clusters/content-launch-server/content-launch-delegate.h": {"list"}, + "src/app/clusters/content-launch-server/content-launch-server.cpp": {"list"}, + "src/app/clusters/media-input-server/media-input-delegate.h": {"list"}, + "src/app/clusters/media-playback-server/media-playback-delegate.h": {"list"}, + "src/app/clusters/target-navigator-server/target-navigator-delegate.h": {"list"}, + "src/credentials/attestation_verifier/FileAttestationTrustStore.h": {"vector"}, + "src/credentials/attestation_verifier/FileAttestationTrustStore.cpp": {"string"}, + "src/setup_payload/AdditionalDataPayload.h": {"string"}, + "src/setup_payload/AdditionalDataPayloadParser.cpp": {"vector"}, + "src/setup_payload/Base38Decode.h": {"string", "vector"}, + "src/setup_payload/ManualSetupPayloadGenerator.h": {"string"}, + "src/setup_payload/ManualSetupPayloadParser.cpp": {"string", "vector"}, + "src/setup_payload/ManualSetupPayloadParser.h": {"string"}, + "src/setup_payload/QRCodeSetupPayloadParser.cpp": {"vector"}, + "src/setup_payload/QRCodeSetupPayloadParser.h": {"string"}, + "src/setup_payload/SetupPayloadHelper.cpp": {"fstream"}, + "src/setup_payload/SetupPayloadHelper.h": {"string"}, + "src/setup_payload/SetupPayload.h": {"map", "string", "vector"}, # Uses platform-define to switch between list and array - 'src/lib/dnssd/minimal_mdns/ResponseSender.h': {'list'}, - + "src/lib/dnssd/minimal_mdns/ResponseSender.h": {"list"}, # Not really for embedded consumers; uses std::queue to keep track # of a list of discovered things. - 'src/controller/SetUpCodePairer.h': {'queue'}, + "src/controller/SetUpCodePairer.h": {"queue"}, } diff --git a/scripts/tools/generate_esp32_chip_factory_bin.py b/scripts/tools/generate_esp32_chip_factory_bin.py index 76975d706317af..05705b9674f14c 100755 --- a/scripts/tools/generate_esp32_chip_factory_bin.py +++ b/scripts/tools/generate_esp32_chip_factory_bin.py @@ -25,160 +25,183 @@ import cryptography.x509 from types import SimpleNamespace -if os.getenv('IDF_PATH'): - sys.path.insert(0, os.path.join(os.getenv('IDF_PATH'), - 'components', - 'nvs_flash', - 'nvs_partition_generator')) +if os.getenv("IDF_PATH"): + sys.path.insert( + 0, + os.path.join( + os.getenv("IDF_PATH"), "components", "nvs_flash", "nvs_partition_generator" + ), + ) import nvs_partition_gen else: log.error("Please set the IDF_PATH environment variable.") exit(0) -INVALID_PASSCODES = [00000000, 11111111, 22222222, 33333333, 44444444, 55555555, - 66666666, 77777777, 88888888, 99999999, 12345678, 87654321] +INVALID_PASSCODES = [ + 00000000, + 11111111, + 22222222, + 33333333, + 44444444, + 55555555, + 66666666, + 77777777, + 88888888, + 99999999, + 12345678, + 87654321, +] TOOLS = {} FACTORY_DATA = { # CommissionableDataProvider - 'discriminator': { - 'type': 'data', - 'encoding': 'u32', - 'value': None, + "discriminator": { + "type": "data", + "encoding": "u32", + "value": None, }, - 'iteration-count': { - 'type': 'data', - 'encoding': 'u32', - 'value': None, + "iteration-count": { + "type": "data", + "encoding": "u32", + "value": None, }, - 'salt': { - 'type': 'data', - 'encoding': 'string', - 'value': None, + "salt": { + "type": "data", + "encoding": "string", + "value": None, }, - 'verifier': { - 'type': 'data', - 'encoding': 'string', - 'value': None, + "verifier": { + "type": "data", + "encoding": "string", + "value": None, }, - # CommissionableDataProvider - 'dac-cert': { - 'type': 'file', - 'encoding': 'binary', - 'value': None, + "dac-cert": { + "type": "file", + "encoding": "binary", + "value": None, }, - 'dac-key': { - 'type': 'file', - 'encoding': 'binary', - 'value': None, + "dac-key": { + "type": "file", + "encoding": "binary", + "value": None, }, - 'dac-pub-key': { - 'type': 'file', - 'encoding': 'binary', - 'value': None, + "dac-pub-key": { + "type": "file", + "encoding": "binary", + "value": None, }, - 'pai-cert': { - 'type': 'file', - 'encoding': 'binary', - 'value': None, + "pai-cert": { + "type": "file", + "encoding": "binary", + "value": None, }, - 'cert-dclrn': { - 'type': 'file', - 'encoding': 'binary', - 'value': None, + "cert-dclrn": { + "type": "file", + "encoding": "binary", + "value": None, }, - # DeviceInstanceInforProvider - 'vendor-id': { - 'type': 'data', - 'encoding': 'u32', - 'value': None, + "vendor-id": { + "type": "data", + "encoding": "u32", + "value": None, + }, + "vendor-name": { + "type": "data", + "encoding": "string", + "value": None, }, - 'vendor-name': { - 'type': 'data', - 'encoding': 'string', - 'value': None, + "product-id": { + "type": "data", + "encoding": "u32", + "value": None, }, - 'product-id': { - 'type': 'data', - 'encoding': 'u32', - 'value': None, + "product-name": { + "type": "data", + "encoding": "string", + "value": None, }, - 'product-name': { - 'type': 'data', - 'encoding': 'string', - 'value': None, + "serial-num": { + "type": "data", + "encoding": "string", + "value": None, }, - 'serial-num': { - 'type': 'data', - 'encoding': 'string', - 'value': None, + "hardware-ver": { + "type": "data", + "encoding": "u32", + "value": None, }, - 'hardware-ver': { - 'type': 'data', - 'encoding': 'u32', - 'value': None, + "hw-ver-str": { + "type": "data", + "encoding": "string", + "value": None, }, - 'hw-ver-str': { - 'type': 'data', - 'encoding': 'string', - 'value': None, + "mfg-date": { + "type": "data", + "encoding": "string", + "value": None, }, - 'mfg-date': { - 'type': 'data', - 'encoding': 'string', - 'value': None, + "unique-id": { + "type": "data", + "encoding": "hex2bin", + "value": None, }, - 'unique-id': { - 'type': 'data', - 'encoding': 'hex2bin', - 'value': None, - } } def check_tools_exists(): - TOOLS['spake2p'] = shutil.which('spake2p') - if TOOLS['spake2p'] is None: - logging.error('spake2p not found, please add spake2p path to PATH environment variable') + TOOLS["spake2p"] = shutil.which("spake2p") + if TOOLS["spake2p"] is None: + logging.error( + "spake2p not found, please add spake2p path to PATH environment variable" + ) sys.exit(1) def check_str_range(s, min_len, max_len, name): if s and ((len(s) < min_len) or (len(s) > max_len)): - logging.error('%s must be between %d and %d characters', name, min_len, max_len) + logging.error("%s must be between %d and %d characters", name, min_len, max_len) sys.exit(1) def check_int_range(value, min_value, max_value, name): if value and ((value < min_value) or (value > max_value)): - logging.error('%s is out of range, should be in range [%d, %d]', name, min_value, max_value) + logging.error( + "%s is out of range, should be in range [%d, %d]", + name, + min_value, + max_value, + ) sys.exit(1) def validate_args(args): # Validate the passcode if args.passcode is not None: - if ((args.passcode < 0x0000001 and args.passcode > 0x5F5E0FE) or (args.passcode in INVALID_PASSCODES)): - logging.error('Invalid passcode:' + str(args.passcode)) + if (args.passcode < 0x0000001 and args.passcode > 0x5F5E0FE) or ( + args.passcode in INVALID_PASSCODES + ): + logging.error("Invalid passcode:" + str(args.passcode)) sys.exit(1) - check_int_range(args.discriminator, 0x0000, 0x0FFF, 'Discriminator') - check_int_range(args.product_id, 0x0000, 0xFFFF, 'Product id') - check_int_range(args.vendor_id, 0x0000, 0xFFFF, 'Vendor id') - check_int_range(args.hw_ver, 0x0000, 0xFFFF, 'Hardware version') + check_int_range(args.discriminator, 0x0000, 0x0FFF, "Discriminator") + check_int_range(args.product_id, 0x0000, 0xFFFF, "Product id") + check_int_range(args.vendor_id, 0x0000, 0xFFFF, "Vendor id") + check_int_range(args.hw_ver, 0x0000, 0xFFFF, "Hardware version") - check_str_range(args.serial_num, 1, 32, 'Serial number') - check_str_range(args.vendor_name, 1, 32, 'Vendor name') - check_str_range(args.product_name, 1, 32, 'Product name') - check_str_range(args.hw_ver_str, 1, 64, 'Hardware version string') - check_str_range(args.mfg_date, 8, 16, 'Manufacturing date') - check_str_range(args.unique_id, 32, 32, 'Unique id') + check_str_range(args.serial_num, 1, 32, "Serial number") + check_str_range(args.vendor_name, 1, 32, "Vendor name") + check_str_range(args.product_name, 1, 32, "Product name") + check_str_range(args.hw_ver_str, 1, 64, "Hardware version string") + check_str_range(args.mfg_date, 8, 16, "Manufacturing date") + check_str_range(args.unique_id, 32, 32, "Unique id") - logging.info('Discriminator:{} Passcode:{}'.format(args.discriminator, args.passcode)) + logging.info( + "Discriminator:{} Passcode:{}".format(args.discriminator, args.passcode) + ) def gen_spake2p_params(passcode): @@ -186,155 +209,226 @@ def gen_spake2p_params(passcode): salt_len_max = 32 cmd = [ - TOOLS['spake2p'], 'gen-verifier', - '--iteration-count', str(iter_count_max), - '--salt-len', str(salt_len_max), - '--pin-code', str(passcode), - '--out', '-', + TOOLS["spake2p"], + "gen-verifier", + "--iteration-count", + str(iter_count_max), + "--salt-len", + str(salt_len_max), + "--pin-code", + str(passcode), + "--out", + "-", ] output = subprocess.check_output(cmd) - output = output.decode('utf-8').splitlines() - return dict(zip(output[0].split(','), output[1].split(','))) + output = output.decode("utf-8").splitlines() + return dict(zip(output[0].split(","), output[1].split(","))) def populate_factory_data(args, spake2p_params): - FACTORY_DATA['discriminator']['value'] = args.discriminator - FACTORY_DATA['iteration-count']['value'] = spake2p_params['Iteration Count'] - FACTORY_DATA['salt']['value'] = spake2p_params['Salt'] - FACTORY_DATA['verifier']['value'] = spake2p_params['Verifier'] - FACTORY_DATA['dac-cert']['value'] = os.path.abspath(args.dac_cert) - FACTORY_DATA['pai-cert']['value'] = os.path.abspath(args.pai_cert) - FACTORY_DATA['cert-dclrn']['value'] = os.path.abspath(args.cd) - FACTORY_DATA['dac-key']['value'] = os.path.abspath('dac_raw_privkey.bin') - FACTORY_DATA['dac-pub-key']['value'] = os.path.abspath('dac_raw_pubkey.bin') + FACTORY_DATA["discriminator"]["value"] = args.discriminator + FACTORY_DATA["iteration-count"]["value"] = spake2p_params["Iteration Count"] + FACTORY_DATA["salt"]["value"] = spake2p_params["Salt"] + FACTORY_DATA["verifier"]["value"] = spake2p_params["Verifier"] + FACTORY_DATA["dac-cert"]["value"] = os.path.abspath(args.dac_cert) + FACTORY_DATA["pai-cert"]["value"] = os.path.abspath(args.pai_cert) + FACTORY_DATA["cert-dclrn"]["value"] = os.path.abspath(args.cd) + FACTORY_DATA["dac-key"]["value"] = os.path.abspath("dac_raw_privkey.bin") + FACTORY_DATA["dac-pub-key"]["value"] = os.path.abspath("dac_raw_pubkey.bin") if args.serial_num is not None: - FACTORY_DATA['serial-num']['value'] = args.serial_num + FACTORY_DATA["serial-num"]["value"] = args.serial_num if args.unique_id is not None: - FACTORY_DATA['unique-id']['value'] = args.unique_id + FACTORY_DATA["unique-id"]["value"] = args.unique_id if args.mfg_date is not None: - FACTORY_DATA['mfg-date']['value'] = args.mfg_date + FACTORY_DATA["mfg-date"]["value"] = args.mfg_date if args.vendor_id is not None: - FACTORY_DATA['vendor-id']['value'] = args.vendor_id + FACTORY_DATA["vendor-id"]["value"] = args.vendor_id if args.vendor_name is not None: - FACTORY_DATA['vendor-name']['value'] = args.vendor_name + FACTORY_DATA["vendor-name"]["value"] = args.vendor_name if args.product_id is not None: - FACTORY_DATA['product-id']['value'] = args.product_id + FACTORY_DATA["product-id"]["value"] = args.product_id if args.product_name is not None: - FACTORY_DATA['product-name']['value'] = args.product_name + FACTORY_DATA["product-name"]["value"] = args.product_name if args.hw_ver is not None: - FACTORY_DATA['hardware-ver']['value'] = args.hw_ver - if (args.hw_ver_str is not None): - FACTORY_DATA['hw-ver-str']['value'] = args.hw_ver_str + FACTORY_DATA["hardware-ver"]["value"] = args.hw_ver + if args.hw_ver_str is not None: + FACTORY_DATA["hw-ver-str"]["value"] = args.hw_ver_str def gen_raw_ec_keypair_from_der(key_file, pubkey_raw_file, privkey_raw_file): - with open(key_file, 'rb') as f: + with open(key_file, "rb") as f: key_data = f.read() - logging.warning('Leaking of DAC private keys may lead to attestation chain revokation') - logging.warning('Please make sure the DAC private is key protected using a password') + logging.warning( + "Leaking of DAC private keys may lead to attestation chain revokation" + ) + logging.warning( + "Please make sure the DAC private is key protected using a password" + ) # WARNING: Below line assumes that the DAC private key is not protected by a password, # please be careful and use the password-protected key if reusing this code - key_der = cryptography.hazmat.primitives.serialization.load_der_private_key(key_data, None) + key_der = cryptography.hazmat.primitives.serialization.load_der_private_key( + key_data, None + ) private_number_val = key_der.private_numbers().private_value - with open(privkey_raw_file, 'wb') as f: - f.write(private_number_val.to_bytes(32, byteorder='big')) + with open(privkey_raw_file, "wb") as f: + f.write(private_number_val.to_bytes(32, byteorder="big")) public_key_first_byte = 0x04 public_number_x = key_der.public_key().public_numbers().x public_number_y = key_der.public_key().public_numbers().y - with open(pubkey_raw_file, 'wb') as f: - f.write(public_key_first_byte.to_bytes(1, byteorder='big')) - f.write(public_number_x.to_bytes(32, byteorder='big')) - f.write(public_number_y.to_bytes(32, byteorder='big')) + with open(pubkey_raw_file, "wb") as f: + f.write(public_key_first_byte.to_bytes(1, byteorder="big")) + f.write(public_number_x.to_bytes(32, byteorder="big")) + f.write(public_number_y.to_bytes(32, byteorder="big")) def generate_nvs_bin(args): - csv_content = 'key,type,encoding,value\n' - csv_content += 'chip-factory,namespace,,\n' + csv_content = "key,type,encoding,value\n" + csv_content += "chip-factory,namespace,,\n" for k, v in FACTORY_DATA.items(): - if v['value'] is None: + if v["value"] is None: continue csv_content += f"{k},{v['type']},{v['encoding']},{v['value']}\n" - with open('nvs_partition.csv', 'w') as f: + with open("nvs_partition.csv", "w") as f: f.write(csv_content) - nvs_args = SimpleNamespace(input='nvs_partition.csv', - output='partition.bin', - size=hex(args.size), - outdir=os.getcwd(), - version=2) + nvs_args = SimpleNamespace( + input="nvs_partition.csv", + output="partition.bin", + size=hex(args.size), + outdir=os.getcwd(), + version=2, + ) nvs_partition_gen.generate(nvs_args) def print_flashing_help(): - logging.info('To flash the generated partition.bin, run the following command:') - logging.info('==============================================================') - logging.info('esptool.py -p write_flash partition.bin') - logging.info('==============================================================') - logging.info('default \"nvs\" partition addr is 0x9000') + logging.info("To flash the generated partition.bin, run the following command:") + logging.info("==============================================================") + logging.info("esptool.py -p write_flash partition.bin") + logging.info("==============================================================") + logging.info('default "nvs" partition addr is 0x9000') def clean_up(): - os.remove('nvs_partition.csv') - os.remove(FACTORY_DATA['dac-pub-key']['value']) - os.remove(FACTORY_DATA['dac-key']['value']) + os.remove("nvs_partition.csv") + os.remove(FACTORY_DATA["dac-pub-key"]["value"]) + os.remove(FACTORY_DATA["dac-key"]["value"]) def main(): - def any_base_int(s): return int(s, 0) + def any_base_int(s): + return int(s, 0) - parser = argparse.ArgumentParser(description='Chip Factory NVS binary generator tool') + parser = argparse.ArgumentParser( + description="Chip Factory NVS binary generator tool" + ) # These will be used by CommissionalbeDataProvider - parser.add_argument('-p', '--passcode', type=any_base_int, required=True, - help='The setup passcode for pairing, range: 0x01-0x5F5E0FE') - parser.add_argument('-d', '--discriminator', type=any_base_int, required=True, - help='The discriminator for pairing, range: 0x00-0x0FFF') + parser.add_argument( + "-p", + "--passcode", + type=any_base_int, + required=True, + help="The setup passcode for pairing, range: 0x01-0x5F5E0FE", + ) + parser.add_argument( + "-d", + "--discriminator", + type=any_base_int, + required=True, + help="The discriminator for pairing, range: 0x00-0x0FFF", + ) # These will be used by DeviceAttestationCredentialsProvider - parser.add_argument('--dac-cert', type=str, required=True, - help='The path to the DAC certificate in der format') - parser.add_argument('--dac-key', type=str, required=True, - help='The path to the DAC private key in der format') - parser.add_argument('--pai-cert', type=str, required=True, - help='The path to the PAI certificate in der format') - parser.add_argument('--cd', type=str, required=True, - help='The path to the certificate declaration der format') + parser.add_argument( + "--dac-cert", + type=str, + required=True, + help="The path to the DAC certificate in der format", + ) + parser.add_argument( + "--dac-key", + type=str, + required=True, + help="The path to the DAC private key in der format", + ) + parser.add_argument( + "--pai-cert", + type=str, + required=True, + help="The path to the PAI certificate in der format", + ) + parser.add_argument( + "--cd", + type=str, + required=True, + help="The path to the certificate declaration der format", + ) # These will be used by DeviceInstanceInfoProvider - parser.add_argument('--vendor-id', type=any_base_int, required=False, help='Vendor id') - parser.add_argument('--vendor-name', type=str, required=False, help='Vendor name') - parser.add_argument('--product-id', type=any_base_int, required=False, help='Product id') - parser.add_argument('--product-name', type=str, required=False, help='Product name') - parser.add_argument('--hw-ver', type=any_base_int, required=False, help='Hardware version') - parser.add_argument('--hw-ver-str', type=str, required=False, help='Hardware version string') - parser.add_argument('--mfg-date', type=str, required=False, help='Manufacturing date in format YYYY-MM-DD') - parser.add_argument('--serial-num', type=str, required=False, help='Serial number') - parser.add_argument('--unique-id', type=str, required=False, - help='128-bit unique identifier, provide 32-byte hex string, e.g. "1234567890abcdef1234567890abcdef"') - - parser.add_argument('-s', '--size', type=any_base_int, required=False, default=0x6000, - help='The size of the partition.bin, default: 0x6000') + parser.add_argument( + "--vendor-id", type=any_base_int, required=False, help="Vendor id" + ) + parser.add_argument("--vendor-name", type=str, required=False, help="Vendor name") + parser.add_argument( + "--product-id", type=any_base_int, required=False, help="Product id" + ) + parser.add_argument("--product-name", type=str, required=False, help="Product name") + parser.add_argument( + "--hw-ver", type=any_base_int, required=False, help="Hardware version" + ) + parser.add_argument( + "--hw-ver-str", type=str, required=False, help="Hardware version string" + ) + parser.add_argument( + "--mfg-date", + type=str, + required=False, + help="Manufacturing date in format YYYY-MM-DD", + ) + parser.add_argument("--serial-num", type=str, required=False, help="Serial number") + parser.add_argument( + "--unique-id", + type=str, + required=False, + help='128-bit unique identifier, provide 32-byte hex string, e.g. "1234567890abcdef1234567890abcdef"', + ) + + parser.add_argument( + "-s", + "--size", + type=any_base_int, + required=False, + default=0x6000, + help="The size of the partition.bin, default: 0x6000", + ) args = parser.parse_args() validate_args(args) check_tools_exists() spake2p_params = gen_spake2p_params(args.passcode) populate_factory_data(args, spake2p_params) - gen_raw_ec_keypair_from_der(args.dac_key, FACTORY_DATA['dac-pub-key']['value'], FACTORY_DATA['dac-key']['value']) + gen_raw_ec_keypair_from_der( + args.dac_key, + FACTORY_DATA["dac-pub-key"]["value"], + FACTORY_DATA["dac-key"]["value"], + ) generate_nvs_bin(args) print_flashing_help() clean_up() if __name__ == "__main__": - logging.basicConfig(format='[%(asctime)s] [%(levelname)7s] - %(message)s', level=logging.INFO) + logging.basicConfig( + format="[%(asctime)s] [%(levelname)7s] - %(message)s", level=logging.INFO + ) main() diff --git a/scripts/tools/zap_regen_all.py b/scripts/tools/zap_regen_all.py index 23ead01804b0fa..d19bfc485fc175 100755 --- a/scripts/tools/zap_regen_all.py +++ b/scripts/tools/zap_regen_all.py @@ -22,13 +22,12 @@ import subprocess import logging -CHIP_ROOT_DIR = os.path.realpath( - os.path.join(os.path.dirname(__file__), '../..')) +CHIP_ROOT_DIR = os.path.realpath(os.path.join(os.path.dirname(__file__), "../..")) class ZAPGenerateTarget: def __init__(self, zap_config, template=None, output_dir=None): - self.script = './scripts/tools/zap/generate.py' + self.script = "./scripts/tools/zap/generate.py" self.zap_config = str(zap_config) self.template = template @@ -39,30 +38,27 @@ def __init__(self, zap_config, template=None, output_dir=None): self.output_dir = None def log_command(self): - """Log the command that will get run for this target - """ + """Log the command that will get run for this target""" logging.info(" %s" % " ".join(self.build_cmd())) def build_cmd(self): - """Builds the command line we would run to generate this target. - """ + """Builds the command line we would run to generate this target.""" cmd = [self.script, self.zap_config] if self.template: - cmd.append('-t') + cmd.append("-t") cmd.append(self.template) if self.output_dir: if not os.path.exists(self.output_dir): os.makedirs(self.output_dir) - cmd.append('-o') + cmd.append("-o") cmd.append(self.output_dir) return cmd def generate(self): - """Runs a ZAP generate command on the configured zap/template/outputs. - """ + """Runs a ZAP generate command on the configured zap/template/outputs.""" cmd = self.build_cmd() logging.info("Generating target: %s" % " ".join(cmd)) subprocess.check_call(cmd) @@ -71,138 +67,154 @@ def generate(self): with open(af_gen_event, "w+"): # Empty file needed for linux pass idl_path = self.zap_config.replace(".zap", ".matter") - target_path = os.path.join("examples", - "chef", - "devices", - os.path.basename(idl_path)) + target_path = os.path.join( + "examples", "chef", "devices", os.path.basename(idl_path) + ) os.rename(idl_path, target_path) def checkPythonVersion(): if sys.version_info[0] < 3: - print('Must use Python 3. Current version is ' + - str(sys.version_info[0])) + print("Must use Python 3. Current version is " + str(sys.version_info[0])) exit(1) def setupArgumentsParser(): - parser = argparse.ArgumentParser( - description='Generate content from ZAP files') - parser.add_argument('--type', default='all', choices=['all', 'tests'], - help='Choose which content type to generate (default: all)') - parser.add_argument('--tests', default='all', choices=['all', 'chip-tool', 'darwin-framework-tool', 'app1', 'app2'], - help='When generating tests only target, Choose which tests to generate (default: all)') - parser.add_argument('--dry-run', default=False, action='store_true', - help="Don't do any generationl just log what targets would be generated (default: False)") + parser = argparse.ArgumentParser(description="Generate content from ZAP files") + parser.add_argument( + "--type", + default="all", + choices=["all", "tests"], + help="Choose which content type to generate (default: all)", + ) + parser.add_argument( + "--tests", + default="all", + choices=["all", "chip-tool", "darwin-framework-tool", "app1", "app2"], + help="When generating tests only target, Choose which tests to generate (default: all)", + ) + parser.add_argument( + "--dry-run", + default=False, + action="store_true", + help="Don't do any generationl just log what targets would be generated (default: False)", + ) return parser.parse_args() def getGlobalTemplatesTargets(): targets = [] - for filepath in Path('./examples').rglob('*.zap'): + for filepath in Path("./examples").rglob("*.zap"): example_name = filepath.as_posix() - example_name = example_name[example_name.index('examples/') + 9:] - example_name = example_name[:example_name.index('/')] + example_name = example_name[example_name.index("examples/") + 9 :] + example_name = example_name[: example_name.index("/")] # Place holder has apps within each build if example_name == "placeholder": example_name = filepath.as_posix() - example_name = example_name[example_name.index( - 'apps/') + len('apps/'):] - example_name = example_name[:example_name.index('/')] - logging.info("Found example %s (via %s)" % - (example_name, str(filepath))) + example_name = example_name[example_name.index("apps/") + len("apps/") :] + example_name = example_name[: example_name.index("/")] + logging.info("Found example %s (via %s)" % (example_name, str(filepath))) # The name zap-generated is to make includes clear by using # a name like output_dir = os.path.join( - 'zzz_generated', 'placeholder', example_name, 'zap-generated') - template = 'examples/placeholder/templates/templates.json' + "zzz_generated", "placeholder", example_name, "zap-generated" + ) + template = "examples/placeholder/templates/templates.json" targets.append(ZAPGenerateTarget(filepath, output_dir=output_dir)) targets.append( - ZAPGenerateTarget(filepath, output_dir=output_dir, template=template)) + ZAPGenerateTarget(filepath, output_dir=output_dir, template=template) + ) continue if example_name == "chef": if os.path.join("chef", "devices") not in str(filepath): continue - example_name = "chef-"+os.path.basename(filepath)[:-len(".zap")] + example_name = "chef-" + os.path.basename(filepath)[: -len(".zap")] - logging.info("Found example %s (via %s)" % - (example_name, str(filepath))) + logging.info("Found example %s (via %s)" % (example_name, str(filepath))) # The name zap-generated is to make includes clear by using # a name like - output_dir = os.path.join( - 'zzz_generated', example_name, 'zap-generated') + output_dir = os.path.join("zzz_generated", example_name, "zap-generated") targets.append(ZAPGenerateTarget(filepath, output_dir=output_dir)) - targets.append(ZAPGenerateTarget( - 'src/controller/data_model/controller-clusters.zap', - output_dir=os.path.join('zzz_generated/controller-clusters/zap-generated'))) + targets.append( + ZAPGenerateTarget( + "src/controller/data_model/controller-clusters.zap", + output_dir=os.path.join("zzz_generated/controller-clusters/zap-generated"), + ) + ) return targets def getTestsTemplatesTargets(test_target): templates = { - 'chip-tool': { - 'zap': 'src/controller/data_model/controller-clusters.zap', - 'template': 'examples/chip-tool/templates/tests/templates.json', - 'output_dir': 'zzz_generated/chip-tool/zap-generated' + "chip-tool": { + "zap": "src/controller/data_model/controller-clusters.zap", + "template": "examples/chip-tool/templates/tests/templates.json", + "output_dir": "zzz_generated/chip-tool/zap-generated", + }, + "darwin-framework-tool": { + "zap": "src/controller/data_model/controller-clusters.zap", + "template": "examples/darwin-framework-tool/templates/tests/templates.json", + "output_dir": "zzz_generated/darwin-framework-tool/zap-generated", }, - 'darwin-framework-tool': { - 'zap': 'src/controller/data_model/controller-clusters.zap', - 'template': 'examples/darwin-framework-tool/templates/tests/templates.json', - 'output_dir': 'zzz_generated/darwin-framework-tool/zap-generated' - } } # Place holder has apps within each build - for filepath in Path('./examples/placeholder').rglob('*.zap'): + for filepath in Path("./examples/placeholder").rglob("*.zap"): example_name = filepath.as_posix() - example_name = example_name[example_name.index( - 'apps/') + len('apps/'):] - example_name = example_name[:example_name.index('/')] + example_name = example_name[example_name.index("apps/") + len("apps/") :] + example_name = example_name[: example_name.index("/")] templates[example_name] = { - 'zap': filepath, - 'template': 'examples/placeholder/templates/templates.json', - 'output_dir': os.path.join('zzz_generated', 'placeholder', example_name, 'zap-generated') + "zap": filepath, + "template": "examples/placeholder/templates/templates.json", + "output_dir": os.path.join( + "zzz_generated", "placeholder", example_name, "zap-generated" + ), } targets = [] for key, target in templates.items(): - if test_target == 'all' or test_target == key: - logging.info("Found test target %s (via %s)" % - (key, target['template'])) - targets.append(ZAPGenerateTarget( - target['zap'], template=target['template'], output_dir=target['output_dir'])) + if test_target == "all" or test_target == key: + logging.info("Found test target %s (via %s)" % (key, target["template"])) + targets.append( + ZAPGenerateTarget( + target["zap"], + template=target["template"], + output_dir=target["output_dir"], + ) + ) return targets def getSpecificTemplatesTargets(): - zap_filepath = 'src/controller/data_model/controller-clusters.zap' + zap_filepath = "src/controller/data_model/controller-clusters.zap" # Mapping of required template and output directory templates = { - 'src/app/common/templates/templates.json': 'zzz_generated/app-common/app-common/zap-generated', - 'src/app/tests/suites/templates/templates.json': 'zzz_generated/app-common/app-common/zap-generated', - 'examples/chip-tool/templates/templates.json': 'zzz_generated/chip-tool/zap-generated', - 'examples/darwin-framework-tool/templates/templates.json': 'zzz_generated/darwin-framework-tool/zap-generated', - 'src/controller/python/templates/templates.json': None, - 'src/darwin/Framework/CHIP/templates/templates.json': None, - 'src/controller/java/templates/templates.json': None, + "src/app/common/templates/templates.json": "zzz_generated/app-common/app-common/zap-generated", + "src/app/tests/suites/templates/templates.json": "zzz_generated/app-common/app-common/zap-generated", + "examples/chip-tool/templates/templates.json": "zzz_generated/chip-tool/zap-generated", + "examples/darwin-framework-tool/templates/templates.json": "zzz_generated/darwin-framework-tool/zap-generated", + "src/controller/python/templates/templates.json": None, + "src/darwin/Framework/CHIP/templates/templates.json": None, + "src/controller/java/templates/templates.json": None, } targets = [] for template, output_dir in templates.items(): logging.info("Found specific template %s" % template) - targets.append(ZAPGenerateTarget( - zap_filepath, template=template, output_dir=output_dir)) + targets.append( + ZAPGenerateTarget(zap_filepath, template=template, output_dir=output_dir) + ) return targets @@ -210,11 +222,11 @@ def getSpecificTemplatesTargets(): def getTargets(type, test_target): targets = [] - if type == 'all': + if type == "all": targets.extend(getGlobalTemplatesTargets()) - targets.extend(getTestsTemplatesTargets('all')) + targets.extend(getTestsTemplatesTargets("all")) targets.extend(getSpecificTemplatesTargets()) - elif type == 'tests': + elif type == "tests": targets.extend(getTestsTemplatesTargets(test_target)) logging.info("Targets to be generated:") @@ -226,8 +238,7 @@ def getTargets(type, test_target): def main(): logging.basicConfig( - level=logging.INFO, - format='%(asctime)s %(name)s %(levelname)-7s %(message)s' + level=logging.INFO, format="%(asctime)s %(name)s %(levelname)-7s %(message)s" ) checkPythonVersion() os.chdir(CHIP_ROOT_DIR) @@ -235,10 +246,10 @@ def main(): targets = getTargets(args.type, args.tests) - if (not args.dry_run): + if not args.dry_run: for target in targets: target.generate() -if __name__ == '__main__': +if __name__ == "__main__": main() diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 44aad058f9ee7f..72c3ae1dc3b2f6 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -677,7 +677,7 @@ bool InteractionModelEngine::EnsureResourceForSubscription(FabricIndex aFabricIn #if CONFIG_BUILD_FOR_HOST_UNIT_TEST const bool allowUnlimited = !mForceHandlerQuota; #else // CONFIG_BUILD_FOR_HOST_UNIT_TEST - // If the resources are allocated on the heap, we should be able to handle as many Read / Subscribe requests as possible. + // If the resources are allocated on the heap, we should be able to handle as many Read / Subscribe requests as possible. const bool allowUnlimited = true; #endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST #else // CHIP_SYSTEM_CONFIG_POOL_USE_HEAP && !CHIP_CONFIG_IM_FORCE_FABRIC_QUOTA_CHECK @@ -861,7 +861,7 @@ Protocols::InteractionModel::Status InteractionModelEngine::EnsureResourceForRea #if CONFIG_BUILD_FOR_HOST_UNIT_TEST const bool allowUnlimited = !mForceHandlerQuota; #else // CONFIG_BUILD_FOR_HOST_UNIT_TEST - // If the resources are allocated on the heap, we should be able to handle as many Read / Subscribe requests as possible. + // If the resources are allocated on the heap, we should be able to handle as many Read / Subscribe requests as possible. const bool allowUnlimited = true; #endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST #else // CHIP_SYSTEM_CONFIG_POOL_USE_HEAP && !CHIP_CONFIG_IM_FORCE_FABRIC_QUOTA_CHECK diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index 3127a3f75b0c08..9fc3549e3ba700 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -905,7 +905,7 @@ bool emberAfOperationalCredentialsClusterAttestationRequestCallback(app::Command size_t attestationElementsLen = 0; MutableByteSpan attestationElementsSpan; uint8_t certDeclBuf[Credentials::kMaxCMSSignedCDMessage]; // Sized to hold the example certificate declaration with 100 PIDs. - // See DeviceAttestationCredsExample + // See DeviceAttestationCredsExample MutableByteSpan certDeclSpan(certDeclBuf); // TODO: Create an alternative way to retrieve the Attestation Challenge without this huge amount of calls. diff --git a/src/app/clusters/scenes/scenes.cpp b/src/app/clusters/scenes/scenes.cpp index 4649d933eb1cff..956de72163bdda 100644 --- a/src/app/clusters/scenes/scenes.cpp +++ b/src/app/clusters/scenes/scenes.cpp @@ -800,7 +800,7 @@ bool emberAfPluginScenesServerParseAddScene( if (enhanced) { entry.transitionTime = transitionTime / 10; - entry.transitionTime100ms = (uint8_t)(transitionTime - entry.transitionTime * 10); + entry.transitionTime100ms = (uint8_t) (transitionTime - entry.transitionTime * 10); } else { diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 7e8bad31264561..1fd2ab08d8e397 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -375,8 +375,8 @@ EmberAfStatus emAfClusterPreAttributeChangedCallback(const app::ConcreteAttribut EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; // Casting and calling a function pointer on the same line results in ignoring the return // of the call on gcc-arm-none-eabi-9-2019-q4-major - EmberAfClusterPreAttributeChangedCallback f = (EmberAfClusterPreAttributeChangedCallback)( - emberAfFindClusterFunction(cluster, CLUSTER_MASK_PRE_ATTRIBUTE_CHANGED_FUNCTION)); + EmberAfClusterPreAttributeChangedCallback f = (EmberAfClusterPreAttributeChangedCallback) (emberAfFindClusterFunction( + cluster, CLUSTER_MASK_PRE_ATTRIBUTE_CHANGED_FUNCTION)); if (f != nullptr) { status = f(attributePath, attributeType, size, value); diff --git a/src/app/util/attribute-table.cpp b/src/app/util/attribute-table.cpp index e0fa107bb24853..b6ae534abcc328 100644 --- a/src/app/util/attribute-table.cpp +++ b/src/app/util/attribute-table.cpp @@ -428,7 +428,7 @@ EmberAfStatus emAfReadAttribute(EndpointId endpoint, ClusterId cluster, Attribut record.clusterId = cluster; record.attributeId = attributeID; status = emAfReadOrWriteAttribute(&record, &metadata, dataPtr, readLength, - false); // write? + false); // write? if (status == EMBER_ZCL_STATUS_SUCCESS) { diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 4ffc01a0143120..c82fbf91b082f9 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -431,23 +431,23 @@ EmberStatus emberAfSendDefaultResponse(const EmberAfClusterCommand * cmd, EmberA void emberAfCopyInt16u(uint8_t * data, uint16_t index, uint16_t x) { - data[index] = (uint8_t)(((x)) & 0xFF); - data[index + 1] = (uint8_t)(((x) >> 8) & 0xFF); + data[index] = (uint8_t) (((x)) & 0xFF); + data[index + 1] = (uint8_t) (((x) >> 8) & 0xFF); } void emberAfCopyInt24u(uint8_t * data, uint16_t index, uint32_t x) { - data[index] = (uint8_t)(((x)) & 0xFF); - data[index + 1] = (uint8_t)(((x) >> 8) & 0xFF); - data[index + 2] = (uint8_t)(((x) >> 16) & 0xFF); + data[index] = (uint8_t) (((x)) & 0xFF); + data[index + 1] = (uint8_t) (((x) >> 8) & 0xFF); + data[index + 2] = (uint8_t) (((x) >> 16) & 0xFF); } void emberAfCopyInt32u(uint8_t * data, uint16_t index, uint32_t x) { - data[index] = (uint8_t)(((x)) & 0xFF); - data[index + 1] = (uint8_t)(((x) >> 8) & 0xFF); - data[index + 2] = (uint8_t)(((x) >> 16) & 0xFF); - data[index + 3] = (uint8_t)(((x) >> 24) & 0xFF); + data[index] = (uint8_t) (((x)) & 0xFF); + data[index + 1] = (uint8_t) (((x) >> 8) & 0xFF); + data[index + 2] = (uint8_t) (((x) >> 16) & 0xFF); + data[index + 3] = (uint8_t) (((x) >> 24) & 0xFF); } void emberAfCopyString(uint8_t * dest, const uint8_t * src, size_t size) @@ -583,9 +583,9 @@ int8_t emberAfCompareValues(const uint8_t * val1, const uint8_t * val2, uint16_t // Moving to time-util.c int8_t emberAfCompareDates(EmberAfDate* date1, EmberAfDate* date2) { - uint32_t val1 = emberAfEncodeDate(date1); - uint32_t val2 = emberAfEncodeDate(date2); - return (val1 == val2) ? 0 : ((val1 < val2) ? -1 : 1); + uint32_t val1 = emberAfEncodeDate(date1); + uint32_t val2 = emberAfEncodeDate(date2); + return (val1 == val2) ? 0 : ((val1 < val2) ? -1 : 1); } #endif diff --git a/src/controller/python/chip/storage/__init__.py b/src/controller/python/chip/storage/__init__.py index cb5c8a1deb9c29..9bfa364cf0de4a 100644 --- a/src/controller/python/chip/storage/__init__.py +++ b/src/controller/python/chip/storage/__init__.py @@ -33,9 +33,11 @@ import builtins _SyncSetKeyValueCbFunct = CFUNCTYPE( - None, py_object, c_char_p, POINTER(c_char), c_uint16) + None, py_object, c_char_p, POINTER(c_char), c_uint16 +) _SyncGetKeyValueCbFunct = CFUNCTYPE( - None, py_object, c_char_p, POINTER(c_char), POINTER(c_uint16), POINTER(c_bool)) + None, py_object, c_char_p, POINTER(c_char), POINTER(c_uint16), POINTER(c_bool) +) _SyncDeleteKeyValueCbFunct = CFUNCTYPE(None, py_object, c_char_p) @@ -46,18 +48,18 @@ def _OnSyncSetKeyValueCb(storageObj, key: str, value, size): @_SyncGetKeyValueCbFunct def _OnSyncGetKeyValueCb(storageObj, key: str, value, size, is_found): - ''' This does not adhere to the API requirements of + """This does not adhere to the API requirements of PersistentStorageDelegate::SyncGetKeyValue, but that is okay since the C++ storage binding layer is capable of adapting results from this method to the requirements of PersistentStorageDelegate::SyncGetKeyValue. - ''' + """ try: keyValue = storageObj.GetSdkKey(key.decode("utf-8")) except Exception as ex: keyValue = None - if (keyValue is not None): + if keyValue is not None: sizeOfValue = size[0] sizeToCopy = min(sizeOfValue, len(keyValue)) @@ -86,42 +88,48 @@ def _OnSyncDeleteKeyValueCb(storageObj, key): class PersistentStorage: - def __init__(self, path: str): self._path = path self._handle = chip.native.GetLibraryHandle() try: - self._file = open(path, 'r') + self._file = open(path, "r") self._file.seek(0, 2) size = self._file.tell() self._file.seek(0) - if (size != 0): + if size != 0: logging.critical(f"Loading configuration from {path}...") self.jsonData = json.load(self._file) else: logging.warn( - f"No valid configuration present at {path} - clearing out configuration") - self.jsonData = {'repl-config': {}, 'sdk-config': {}} + f"No valid configuration present at {path} - clearing out configuration" + ) + self.jsonData = {"repl-config": {}, "sdk-config": {}} except Exception as ex: logging.error(ex) logging.warn( - f"Could not load configuration from {path} - resetting configuration...") - self.jsonData = {'repl-config': {}, 'sdk-config': {}} + f"Could not load configuration from {path} - resetting configuration..." + ) + self.jsonData = {"repl-config": {}, "sdk-config": {}} self._file = None - self._handle.pychip_Storage_InitializeStorageAdapter(ctypes.py_object( - self), _OnSyncSetKeyValueCb, _OnSyncGetKeyValueCb, _OnSyncDeleteKeyValueCb) + self._handle.pychip_Storage_InitializeStorageAdapter( + ctypes.py_object(self), + _OnSyncSetKeyValueCb, + _OnSyncGetKeyValueCb, + _OnSyncDeleteKeyValueCb, + ) def Sync(self): - if (self._file is None): + if self._file is None: try: - self._file = open(self._path, 'w') + self._file = open(self._path, "w") except Exception as ex: logging.warn( - f"Could not open {self._path} for writing configuration. Error:") + f"Could not open {self._path} for writing configuration. Error:" + ) logging.warn(ex) return @@ -133,43 +141,40 @@ def Sync(self): def SetReplKey(self, key: str, value): logging.info(f"SetReplKey: {key} = {value}") - if (key is None or key == ''): + if key is None or key == "": raise ValueError("Invalid Key") - if (value is None): - del(self.jsonData['repl-config'][key]) + if value is None: + del self.jsonData["repl-config"][key] else: - self.jsonData['repl-config'][key] = value + self.jsonData["repl-config"][key] = value self.Sync() def GetReplKey(self, key: str): - return copy.deepcopy(self.jsonData['repl-config'][key]) + return copy.deepcopy(self.jsonData["repl-config"][key]) def SetSdkKey(self, key: str, value: bytes): logging.info(f"SetSdkKey: {key} = {value}") - if (key is None or key == ''): + if key is None or key == "": raise ValueError("Invalid Key") - if (value is None): - raise ValueError('value is not expected to be None') + if value is None: + raise ValueError("value is not expected to be None") else: - self.jsonData['sdk-config'][key] = base64.b64encode( - value).decode("utf-8") + self.jsonData["sdk-config"][key] = base64.b64encode(value).decode("utf-8") self.Sync() def GetSdkKey(self, key: str): - return base64.b64decode(self.jsonData['sdk-config'][key]) + return base64.b64decode(self.jsonData["sdk-config"][key]) def DeleteSdkKey(self, key: str): - del(self.jsonData['sdk-config'][key]) + del self.jsonData["sdk-config"][key] def GetUnderlyingStorageAdapter(self): return self._storageAdapterObj def __del__(self): - builtins.chipStack.Call( - lambda: self._handle.pychip_Storage_ShutdownAdapter() - ) + builtins.chipStack.Call(lambda: self._handle.pychip_Storage_ShutdownAdapter()) diff --git a/src/controller/python/test/test_scripts/base.py b/src/controller/python/test/test_scripts/base.py index 020d7744d44724..f9f1920fe0c4b9 100644 --- a/src/controller/python/test/test_scripts/base.py +++ b/src/controller/python/test/test_scripts/base.py @@ -37,13 +37,11 @@ import copy import secrets -logger = logging.getLogger('PythonMatterControllerTEST') +logger = logging.getLogger("PythonMatterControllerTEST") logger.setLevel(logging.INFO) sh = logging.StreamHandler() -sh.setFormatter( - logging.Formatter( - '%(asctime)s [%(name)s] %(levelname)s %(message)s')) +sh.setFormatter(logging.Formatter("%(asctime)s [%(name)s] %(levelname)s %(message)s")) sh.setStream(sys.stdout) logger.addHandler(sh) @@ -75,9 +73,9 @@ def SetTestSet(enabled_tests, disabled_tests): def TestIsEnabled(test_name: str): enabled_len = -1 disabled_len = -1 - if 'all' in _enabled_tests: + if "all" in _enabled_tests: enabled_len = 0 - if 'all' in _disabled_tests: + if "all" in _disabled_tests: disabled_len = 0 for test_item in _enabled_tests: @@ -106,6 +104,7 @@ def CheckEnableBeforeRun(*args, **kwargs): elif inspect.iscoroutinefunction(func): # noop, so users can use await as usual return asyncio.sleep(0) + return CheckEnableBeforeRun @@ -156,7 +155,8 @@ def assertStatusEqual(self, expected): raise Exception(f"{self.operationName}: no result got") if self.result.status != expected: raise Exception( - f"{self.operationName}: expected status {expected}, got {self.result.status}") + f"{self.operationName}: expected status {expected}, got {self.result.status}" + ) return self def assertValueEqual(self, expected): @@ -165,32 +165,42 @@ def assertValueEqual(self, expected): raise Exception(f"{self.operationName}: no result got") if self.result.value != expected: raise Exception( - f"{self.operationName}: expected value {expected}, got {self.result.value}") + f"{self.operationName}: expected value {expected}, got {self.result.value}" + ) return self class BaseTestHelper: - def __init__(self, nodeid: int, paaTrustStorePath: str, testCommissioner: bool = False): - self.chipStack = ChipStack('/tmp/repl_storage.json') - self.fabricAdmin = chip.FabricAdmin.FabricAdmin( - fabricId=1, fabricIndex=1) + def __init__( + self, nodeid: int, paaTrustStorePath: str, testCommissioner: bool = False + ): + self.chipStack = ChipStack("/tmp/repl_storage.json") + self.fabricAdmin = chip.FabricAdmin.FabricAdmin(fabricId=1, fabricIndex=1) self.devCtrl = self.fabricAdmin.NewController( - nodeid, paaTrustStorePath, testCommissioner) + nodeid, paaTrustStorePath, testCommissioner + ) self.controllerNodeId = nodeid self.logger = logger self.paaTrustStorePath = paaTrustStorePath logging.getLogger().setLevel(logging.DEBUG) async def _GetCommissonedFabricCount(self, nodeid: int): - data = await self.devCtrl.ReadAttribute(nodeid, [(Clusters.OperationalCredentials.Attributes.CommissionedFabrics)]) - return data[0][Clusters.OperationalCredentials][Clusters.OperationalCredentials.Attributes.CommissionedFabrics] + data = await self.devCtrl.ReadAttribute( + nodeid, [(Clusters.OperationalCredentials.Attributes.CommissionedFabrics)] + ) + return data[0][Clusters.OperationalCredentials][ + Clusters.OperationalCredentials.Attributes.CommissionedFabrics + ] def _WaitForOneDiscoveredDevice(self, timeoutSeconds: int = 2): print("Waiting for device responses...") strlen = 100 addrStrStorage = ctypes.create_string_buffer(strlen) timeout = time.time() + timeoutSeconds - while (not self.devCtrl.GetIPForDiscoveredDevice(0, addrStrStorage, strlen) and time.time() <= timeout): + while ( + not self.devCtrl.GetIPForDiscoveredDevice(0, addrStrStorage, strlen) + and time.time() <= timeout + ): time.sleep(0.2) if time.time() > timeout: return None @@ -198,46 +208,59 @@ def _WaitForOneDiscoveredDevice(self, timeoutSeconds: int = 2): def TestDiscovery(self, discriminator: int): self.logger.info( - f"Discovering commissionable nodes with discriminator {discriminator}") + f"Discovering commissionable nodes with discriminator {discriminator}" + ) self.devCtrl.DiscoverCommissionableNodesLongDiscriminator( - ctypes.c_uint16(int(discriminator))) + ctypes.c_uint16(int(discriminator)) + ) res = self._WaitForOneDiscoveredDevice() if not res: - self.logger.info( - f"Device not found") + self.logger.info(f"Device not found") return False self.logger.info(f"Found device at {res}") return res def TestPaseOnly(self, ip: str, setuppin: int, nodeid: int): self.logger.info( - "Attempting to establish PASE session with device id: {} addr: {}".format(str(nodeid), ip)) - if self.devCtrl.EstablishPASESessionIP( - ip.encode("utf-8"), setuppin, nodeid) is not None: + "Attempting to establish PASE session with device id: {} addr: {}".format( + str(nodeid), ip + ) + ) + if ( + self.devCtrl.EstablishPASESessionIP(ip.encode("utf-8"), setuppin, nodeid) + is not None + ): self.logger.info( - "Failed to establish PASE session with device id: {} addr: {}".format(str(nodeid), ip)) + "Failed to establish PASE session with device id: {} addr: {}".format( + str(nodeid), ip + ) + ) return False self.logger.info( - "Successfully established PASE session with device id: {} addr: {}".format(str(nodeid), ip)) + "Successfully established PASE session with device id: {} addr: {}".format( + str(nodeid), ip + ) + ) return True def TestCommissionOnly(self, nodeid: int): - self.logger.info( - "Commissioning device with id {}".format(nodeid)) + self.logger.info("Commissioning device with id {}".format(nodeid)) if not self.devCtrl.Commission(nodeid): self.logger.info( - "Failed to commission device with id {}".format(str(nodeid))) + "Failed to commission device with id {}".format(str(nodeid)) + ) return False self.logger.info( - "Successfully commissioned device with id {}".format(str(nodeid))) + "Successfully commissioned device with id {}".format(str(nodeid)) + ) return True def TestKeyExchangeBLE(self, discriminator: int, setuppin: int, nodeid: int): - self.logger.info( - "Conducting key exchange with device {}".format(discriminator)) + self.logger.info("Conducting key exchange with device {}".format(discriminator)) if not self.devCtrl.ConnectBLE(discriminator, setuppin, nodeid): self.logger.info( - "Failed to finish key exchange with device {}".format(discriminator)) + "Failed to finish key exchange with device {}".format(discriminator) + ) return False self.logger.info("Device finished key exchange.") return True @@ -250,9 +273,13 @@ def TestCommissionFailure(self, nodeid: int, failAfter: int): return True self.logger.info( - "Commissioning device, expecting failure after stage {}".format(failAfter)) + "Commissioning device, expecting failure after stage {}".format(failAfter) + ) self.devCtrl.Commission(nodeid) - return self.devCtrl.CheckTestCommissionerCallbacks() and self.devCtrl.CheckTestCommissionerPaseConnection(nodeid) + return ( + self.devCtrl.CheckTestCommissionerCallbacks() + and self.devCtrl.CheckTestCommissionerPaseConnection(nodeid) + ) def TestCommissionFailureOnReport(self, nodeid: int, failAfter: int): self.devCtrl.ResetTestCommissioner() @@ -261,24 +288,32 @@ def TestCommissionFailureOnReport(self, nodeid: int, failAfter: int): # We're not going to hit this stage during commissioning so no sense trying, just say it was fine. return True self.logger.info( - "Commissioning device, expecting failure on report for stage {}".format(failAfter)) + "Commissioning device, expecting failure on report for stage {}".format( + failAfter + ) + ) self.devCtrl.Commission(nodeid) - return self.devCtrl.CheckTestCommissionerCallbacks() and self.devCtrl.CheckTestCommissionerPaseConnection(nodeid) + return ( + self.devCtrl.CheckTestCommissionerCallbacks() + and self.devCtrl.CheckTestCommissionerPaseConnection(nodeid) + ) def TestCommissioning(self, ip: str, setuppin: int, nodeid: int): self.logger.info("Commissioning device {}".format(ip)) if not self.devCtrl.CommissionIP(ip.encode("utf-8"), setuppin, nodeid): - self.logger.info( - "Failed to finish commissioning device {}".format(ip)) + self.logger.info("Failed to finish commissioning device {}".format(ip)) return False self.logger.info("Commissioning finished.") return True def TestCommissioningWithSetupPayload(self, setupPayload: str, nodeid: int): - self.logger.info("Commissioning device with setup payload {}".format(setupPayload)) + self.logger.info( + "Commissioning device with setup payload {}".format(setupPayload) + ) if not self.devCtrl.CommissionWithCode(setupPayload, nodeid): self.logger.info( - "Failed to finish commissioning device {}".format(setupPayload)) + "Failed to finish commissioning device {}".format(setupPayload) + ) return False self.logger.info("Commissioning finished.") return True @@ -290,26 +325,52 @@ def TestFailsafe(self, nodeid: int): self.logger.info("Testing arm failsafe") self.logger.info("Setting failsafe on CASE connection") - err, resp = self.devCtrl.ZCLSend("GeneralCommissioning", "ArmFailSafe", nodeid, - 0, 0, dict(expiryLengthSeconds=60, breadcrumb=1), blocking=True) + err, resp = self.devCtrl.ZCLSend( + "GeneralCommissioning", + "ArmFailSafe", + nodeid, + 0, + 0, + dict(expiryLengthSeconds=60, breadcrumb=1), + blocking=True, + ) if err != 0: self.logger.error( - "Failed to send arm failsafe command error is {} with im response{}".format(err, resp)) + "Failed to send arm failsafe command error is {} with im response{}".format( + err, resp + ) + ) return False - if resp.errorCode is not Clusters.GeneralCommissioning.Enums.CommissioningError.kOk: + if ( + resp.errorCode + is not Clusters.GeneralCommissioning.Enums.CommissioningError.kOk + ): self.logger.error( - "Incorrect response received from arm failsafe - wanted OK, received {}".format(resp)) + "Incorrect response received from arm failsafe - wanted OK, received {}".format( + resp + ) + ) return False self.logger.info( - "Attempting to open basic commissioning window - this should fail since the failsafe is armed") + "Attempting to open basic commissioning window - this should fail since the failsafe is armed" + ) try: - res = asyncio.run(self.devCtrl.SendCommand( - nodeid, 0, Clusters.AdministratorCommissioning.Commands.OpenBasicCommissioningWindow(180), timedRequestTimeoutMs=10000)) + res = asyncio.run( + self.devCtrl.SendCommand( + nodeid, + 0, + Clusters.AdministratorCommissioning.Commands.OpenBasicCommissioningWindow( + 180 + ), + timedRequestTimeoutMs=10000, + ) + ) # we actually want the exception here because we want to see a failure, so return False here self.logger.error( - 'Incorrectly succeeded in opening basic commissioning window') + "Incorrectly succeeded in opening basic commissioning window" + ) return False except Exception as ex: pass @@ -322,44 +383,92 @@ def TestFailsafe(self, nodeid: int): # not the right size or the right contents, but it won't matter verifier = secrets.token_bytes(32) self.logger.info( - "Attempting to open enhanced commissioning window - this should fail since the failsafe is armed") + "Attempting to open enhanced commissioning window - this should fail since the failsafe is armed" + ) try: - res = asyncio.run(self.devCtrl.SendCommand(nodeid, 0, Clusters.AdministratorCommissioning.Commands.OpenCommissioningWindow( - commissioningTimeout=180, PAKEVerifier=verifier, discriminator=discriminator, iterations=iterations, salt=salt), timedRequestTimeoutMs=10000)) + res = asyncio.run( + self.devCtrl.SendCommand( + nodeid, + 0, + Clusters.AdministratorCommissioning.Commands.OpenCommissioningWindow( + commissioningTimeout=180, + PAKEVerifier=verifier, + discriminator=discriminator, + iterations=iterations, + salt=salt, + ), + timedRequestTimeoutMs=10000, + ) + ) # we actually want the exception here because we want to see a failure, so return False here self.logger.error( - 'Incorrectly succeeded in opening enhanced commissioning window') + "Incorrectly succeeded in opening enhanced commissioning window" + ) return False except Exception as ex: pass self.logger.info("Disarming failsafe on CASE connection") - err, resp = self.devCtrl.ZCLSend("GeneralCommissioning", "ArmFailSafe", nodeid, - 0, 0, dict(expiryLengthSeconds=0, breadcrumb=1), blocking=True) + err, resp = self.devCtrl.ZCLSend( + "GeneralCommissioning", + "ArmFailSafe", + nodeid, + 0, + 0, + dict(expiryLengthSeconds=0, breadcrumb=1), + blocking=True, + ) if err != 0: self.logger.error( - "Failed to send arm failsafe command error is {} with im response{}".format(err, resp)) + "Failed to send arm failsafe command error is {} with im response{}".format( + err, resp + ) + ) return False self.logger.info( - "Opening Commissioning Window - this should succeed since the failsafe was just disarmed") + "Opening Commissioning Window - this should succeed since the failsafe was just disarmed" + ) try: - res = asyncio.run(self.devCtrl.SendCommand( - nodeid, 0, Clusters.AdministratorCommissioning.Commands.OpenBasicCommissioningWindow(180), timedRequestTimeoutMs=10000)) + res = asyncio.run( + self.devCtrl.SendCommand( + nodeid, + 0, + Clusters.AdministratorCommissioning.Commands.OpenBasicCommissioningWindow( + 180 + ), + timedRequestTimeoutMs=10000, + ) + ) except Exception as ex: self.logger.error( - 'Failed to open commissioning window after disarming failsafe') + "Failed to open commissioning window after disarming failsafe" + ) return False self.logger.info( - "Attempting to arm failsafe over CASE - this should fail since the commissioning window is open") - err, resp = self.devCtrl.ZCLSend("GeneralCommissioning", "ArmFailSafe", nodeid, - 0, 0, dict(expiryLengthSeconds=60, breadcrumb=1), blocking=True) + "Attempting to arm failsafe over CASE - this should fail since the commissioning window is open" + ) + err, resp = self.devCtrl.ZCLSend( + "GeneralCommissioning", + "ArmFailSafe", + nodeid, + 0, + 0, + dict(expiryLengthSeconds=60, breadcrumb=1), + blocking=True, + ) if err != 0: self.logger.error( - "Failed to send arm failsafe command error is {} with im response{}".format(err, resp)) + "Failed to send arm failsafe command error is {} with im response{}".format( + err, resp + ) + ) return False - if resp.errorCode is Clusters.GeneralCommissioning.Enums.CommissioningError.kBusyWithOtherAdmin: + if ( + resp.errorCode + is Clusters.GeneralCommissioning.Enums.CommissioningError.kBusyWithOtherAdmin + ): return True return False @@ -370,101 +479,258 @@ async def TestAddUpdateRemoveFabric(self, nodeid: int): startOfTestFabricCount = await self._GetCommissonedFabricCount(nodeid) tempFabric = chip.FabricAdmin.FabricAdmin(fabricId=3, fabricIndex=3) - tempDevCtrl = tempFabric.NewController(self.controllerNodeId, self.paaTrustStorePath) + tempDevCtrl = tempFabric.NewController( + self.controllerNodeId, self.paaTrustStorePath + ) self.logger.info("Setting failsafe on CASE connection") - resp = await self.devCtrl.SendCommand(nodeid, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(60), timedRequestTimeoutMs=1000) - if resp.errorCode is not Clusters.GeneralCommissioning.Enums.CommissioningError.kOk: + resp = await self.devCtrl.SendCommand( + nodeid, + 0, + Clusters.GeneralCommissioning.Commands.ArmFailSafe(60), + timedRequestTimeoutMs=1000, + ) + if ( + resp.errorCode + is not Clusters.GeneralCommissioning.Enums.CommissioningError.kOk + ): self.logger.error( - "Incorrect response received from arm failsafe - wanted OK, received {}".format(resp)) + "Incorrect response received from arm failsafe - wanted OK, received {}".format( + resp + ) + ) return False - csrForAddNOC = await self.devCtrl.SendCommand(nodeid, 0, Clusters.OperationalCredentials.Commands.CSRRequest(CSRNonce=b'1' * 32)) + csrForAddNOC = await self.devCtrl.SendCommand( + nodeid, + 0, + Clusters.OperationalCredentials.Commands.CSRRequest(CSRNonce=b"1" * 32), + ) chainForAddNOC = tempDevCtrl.IssueNOCChain(csrForAddNOC, nodeid) - if chainForAddNOC.rcacBytes is None or chainForAddNOC.icacBytes is None or chainForAddNOC.nocBytes is None or chainForAddNOC.ipkBytes is None: - self.logger.error("IssueNOCChain failed to generate valid cert chain for AddNOC") + if ( + chainForAddNOC.rcacBytes is None + or chainForAddNOC.icacBytes is None + or chainForAddNOC.nocBytes is None + or chainForAddNOC.ipkBytes is None + ): + self.logger.error( + "IssueNOCChain failed to generate valid cert chain for AddNOC" + ) return False self.logger.info("Starting AddNOC portion of test") # TODO error check on the commands below - await self.devCtrl.SendCommand(nodeid, 0, Clusters.OperationalCredentials.Commands.AddTrustedRootCertificate(chainForAddNOC.rcacBytes)) - await self.devCtrl.SendCommand(nodeid, 0, Clusters.OperationalCredentials.Commands.AddNOC(chainForAddNOC.nocBytes, chainForAddNOC.icacBytes, chainForAddNOC.ipkBytes, tempDevCtrl.GetNodeId(), 0xFFF1)) - await tempDevCtrl.SendCommand(nodeid, 0, Clusters.GeneralCommissioning.Commands.CommissioningComplete()) + await self.devCtrl.SendCommand( + nodeid, + 0, + Clusters.OperationalCredentials.Commands.AddTrustedRootCertificate( + chainForAddNOC.rcacBytes + ), + ) + await self.devCtrl.SendCommand( + nodeid, + 0, + Clusters.OperationalCredentials.Commands.AddNOC( + chainForAddNOC.nocBytes, + chainForAddNOC.icacBytes, + chainForAddNOC.ipkBytes, + tempDevCtrl.GetNodeId(), + 0xFFF1, + ), + ) + await tempDevCtrl.SendCommand( + nodeid, 0, Clusters.GeneralCommissioning.Commands.CommissioningComplete() + ) afterAddNocFabricCount = await self._GetCommissonedFabricCount(nodeid) if startOfTestFabricCount == afterAddNocFabricCount: - self.logger.error("Expected commissioned fabric count to change after AddNOC") + self.logger.error( + "Expected commissioned fabric count to change after AddNOC" + ) return False - resp = await tempDevCtrl.ReadAttribute(nodeid, [(Clusters.Basic.Attributes.ClusterRevision)]) - clusterRevision = resp[0][Clusters.Basic][Clusters.Basic.Attributes.ClusterRevision] - if not isinstance(clusterRevision, chip.tlv.uint) or clusterRevision < 1 or clusterRevision > _UINT16_MAX: + resp = await tempDevCtrl.ReadAttribute( + nodeid, [(Clusters.Basic.Attributes.ClusterRevision)] + ) + clusterRevision = resp[0][Clusters.Basic][ + Clusters.Basic.Attributes.ClusterRevision + ] + if ( + not isinstance(clusterRevision, chip.tlv.uint) + or clusterRevision < 1 + or clusterRevision > _UINT16_MAX + ): self.logger.error( - "Failed to read valid cluster revision on newly added fabric {}".format(resp)) + "Failed to read valid cluster revision on newly added fabric {}".format( + resp + ) + ) return False self.logger.info("Starting UpdateNOC using same node ID") - resp = await tempDevCtrl.SendCommand(nodeid, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(600), timedRequestTimeoutMs=1000) - if resp.errorCode is not Clusters.GeneralCommissioning.Enums.CommissioningError.kOk: + resp = await tempDevCtrl.SendCommand( + nodeid, + 0, + Clusters.GeneralCommissioning.Commands.ArmFailSafe(600), + timedRequestTimeoutMs=1000, + ) + if ( + resp.errorCode + is not Clusters.GeneralCommissioning.Enums.CommissioningError.kOk + ): self.logger.error( - "Incorrect response received from arm failsafe - wanted OK, received {}".format(resp)) + "Incorrect response received from arm failsafe - wanted OK, received {}".format( + resp + ) + ) return False csrForUpdateNOC = await tempDevCtrl.SendCommand( - nodeid, 0, Clusters.OperationalCredentials.Commands.CSRRequest(CSRNonce=b'1' * 32, isForUpdateNOC=True)) + nodeid, + 0, + Clusters.OperationalCredentials.Commands.CSRRequest( + CSRNonce=b"1" * 32, isForUpdateNOC=True + ), + ) chainForUpdateNOC = tempDevCtrl.IssueNOCChain(csrForUpdateNOC, nodeid) - if chainForUpdateNOC.rcacBytes is None or chainForUpdateNOC.icacBytes is None or chainForUpdateNOC.nocBytes is None or chainForUpdateNOC.ipkBytes is None: - self.logger.error("IssueNOCChain failed to generate valid cert chain for UpdateNOC") + if ( + chainForUpdateNOC.rcacBytes is None + or chainForUpdateNOC.icacBytes is None + or chainForUpdateNOC.nocBytes is None + or chainForUpdateNOC.ipkBytes is None + ): + self.logger.error( + "IssueNOCChain failed to generate valid cert chain for UpdateNOC" + ) return False - await tempDevCtrl.SendCommand(nodeid, 0, Clusters.OperationalCredentials.Commands.UpdateNOC(chainForUpdateNOC.nocBytes, chainForUpdateNOC.icacBytes)) - await tempDevCtrl.SendCommand(nodeid, 0, Clusters.GeneralCommissioning.Commands.CommissioningComplete()) + await tempDevCtrl.SendCommand( + nodeid, + 0, + Clusters.OperationalCredentials.Commands.UpdateNOC( + chainForUpdateNOC.nocBytes, chainForUpdateNOC.icacBytes + ), + ) + await tempDevCtrl.SendCommand( + nodeid, 0, Clusters.GeneralCommissioning.Commands.CommissioningComplete() + ) afterUpdateNocFabricCount = await self._GetCommissonedFabricCount(nodeid) if afterUpdateNocFabricCount != afterAddNocFabricCount: - self.logger.error("Expected commissioned fabric count to remain unchanged after UpdateNOC") + self.logger.error( + "Expected commissioned fabric count to remain unchanged after UpdateNOC" + ) return False - resp = await tempDevCtrl.ReadAttribute(nodeid, [(Clusters.Basic.Attributes.ClusterRevision)]) - clusterRevision = resp[0][Clusters.Basic][Clusters.Basic.Attributes.ClusterRevision] - if not isinstance(clusterRevision, chip.tlv.uint) or clusterRevision < 1 or clusterRevision > _UINT16_MAX: + resp = await tempDevCtrl.ReadAttribute( + nodeid, [(Clusters.Basic.Attributes.ClusterRevision)] + ) + clusterRevision = resp[0][Clusters.Basic][ + Clusters.Basic.Attributes.ClusterRevision + ] + if ( + not isinstance(clusterRevision, chip.tlv.uint) + or clusterRevision < 1 + or clusterRevision > _UINT16_MAX + ): self.logger.error( - "Failed to read valid cluster revision on after UpdateNOC {}".format(resp)) + "Failed to read valid cluster revision on after UpdateNOC {}".format( + resp + ) + ) return False self.logger.info("Starting UpdateNOC using different node ID") - resp = await tempDevCtrl.SendCommand(nodeid, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(600), timedRequestTimeoutMs=1000) - if resp.errorCode is not Clusters.GeneralCommissioning.Enums.CommissioningError.kOk: + resp = await tempDevCtrl.SendCommand( + nodeid, + 0, + Clusters.GeneralCommissioning.Commands.ArmFailSafe(600), + timedRequestTimeoutMs=1000, + ) + if ( + resp.errorCode + is not Clusters.GeneralCommissioning.Enums.CommissioningError.kOk + ): self.logger.error( - "Incorrect response received from arm failsafe - wanted OK, received {}".format(resp)) + "Incorrect response received from arm failsafe - wanted OK, received {}".format( + resp + ) + ) return False csrForUpdateNOC = await tempDevCtrl.SendCommand( - nodeid, 0, Clusters.OperationalCredentials.Commands.CSRRequest(CSRNonce=b'1' * 32, isForUpdateNOC=True)) + nodeid, + 0, + Clusters.OperationalCredentials.Commands.CSRRequest( + CSRNonce=b"1" * 32, isForUpdateNOC=True + ), + ) newNodeIdForUpdateNoc = nodeid + 1 - chainForSecondUpdateNOC = tempDevCtrl.IssueNOCChain(csrForUpdateNOC, newNodeIdForUpdateNoc) - if chainForSecondUpdateNOC.rcacBytes is None or chainForSecondUpdateNOC.icacBytes is None or chainForSecondUpdateNOC.nocBytes is None or chainForSecondUpdateNOC.ipkBytes is None: - self.logger.error("IssueNOCChain failed to generate valid cert chain for UpdateNOC with new node ID") + chainForSecondUpdateNOC = tempDevCtrl.IssueNOCChain( + csrForUpdateNOC, newNodeIdForUpdateNoc + ) + if ( + chainForSecondUpdateNOC.rcacBytes is None + or chainForSecondUpdateNOC.icacBytes is None + or chainForSecondUpdateNOC.nocBytes is None + or chainForSecondUpdateNOC.ipkBytes is None + ): + self.logger.error( + "IssueNOCChain failed to generate valid cert chain for UpdateNOC with new node ID" + ) return False - updateNocResponse = await tempDevCtrl.SendCommand(nodeid, 0, Clusters.OperationalCredentials.Commands.UpdateNOC(chainForSecondUpdateNOC.nocBytes, chainForSecondUpdateNOC.icacBytes)) - await tempDevCtrl.SendCommand(newNodeIdForUpdateNoc, 0, Clusters.GeneralCommissioning.Commands.CommissioningComplete()) - afterUpdateNocWithNewNodeIdFabricCount = await self._GetCommissonedFabricCount(nodeid) + updateNocResponse = await tempDevCtrl.SendCommand( + nodeid, + 0, + Clusters.OperationalCredentials.Commands.UpdateNOC( + chainForSecondUpdateNOC.nocBytes, chainForSecondUpdateNOC.icacBytes + ), + ) + await tempDevCtrl.SendCommand( + newNodeIdForUpdateNoc, + 0, + Clusters.GeneralCommissioning.Commands.CommissioningComplete(), + ) + afterUpdateNocWithNewNodeIdFabricCount = await self._GetCommissonedFabricCount( + nodeid + ) if afterUpdateNocFabricCount != afterUpdateNocWithNewNodeIdFabricCount: - self.logger.error("Expected commissioned fabric count to remain unchanged after UpdateNOC with new node ID") + self.logger.error( + "Expected commissioned fabric count to remain unchanged after UpdateNOC with new node ID" + ) return False # TODO Read using old node ID and expect that it fails. - resp = await tempDevCtrl.ReadAttribute(newNodeIdForUpdateNoc, [(Clusters.Basic.Attributes.ClusterRevision)]) - clusterRevision = resp[0][Clusters.Basic][Clusters.Basic.Attributes.ClusterRevision] - if not isinstance(clusterRevision, chip.tlv.uint) or clusterRevision < 1 or clusterRevision > _UINT16_MAX: + resp = await tempDevCtrl.ReadAttribute( + newNodeIdForUpdateNoc, [(Clusters.Basic.Attributes.ClusterRevision)] + ) + clusterRevision = resp[0][Clusters.Basic][ + Clusters.Basic.Attributes.ClusterRevision + ] + if ( + not isinstance(clusterRevision, chip.tlv.uint) + or clusterRevision < 1 + or clusterRevision > _UINT16_MAX + ): self.logger.error( - "Failed to read valid cluster revision on after UpdateNOC with new node ID {}".format(resp)) + "Failed to read valid cluster revision on after UpdateNOC with new node ID {}".format( + resp + ) + ) return False - removeFabricResponse = await tempDevCtrl.SendCommand(newNodeIdForUpdateNoc, 0, Clusters.OperationalCredentials.Commands.RemoveFabric(updateNocResponse.fabricIndex)) + removeFabricResponse = await tempDevCtrl.SendCommand( + newNodeIdForUpdateNoc, + 0, + Clusters.OperationalCredentials.Commands.RemoveFabric( + updateNocResponse.fabricIndex + ), + ) endOfTestFabricCount = await self._GetCommissonedFabricCount(nodeid) if endOfTestFabricCount != startOfTestFabricCount: - self.logger.error("Expected fabric count to be the same at the end of test as when it started") + self.logger.error( + "Expected fabric count to be the same at the end of test as when it started" + ) return False tempDevCtrl.Shutdown() @@ -486,7 +752,9 @@ async def TestCaseEviction(self, nodeid: int): # for x in range(minimumSupportedFabrics * minimumCASESessionsPerFabric * 2): self.devCtrl.CloseSession(nodeid) - await self.devCtrl.ReadAttribute(nodeid, [(Clusters.Basic.Attributes.ClusterRevision)]) + await self.devCtrl.ReadAttribute( + nodeid, [(Clusters.Basic.Attributes.ClusterRevision)] + ) self.logger.info("Testing CASE defunct logic") @@ -500,15 +768,23 @@ async def TestCaseEviction(self, nodeid: int): # sawValueChange = False - def OnValueChange(path: Attribute.TypedAttributePath, transaction: Attribute.SubscriptionTransaction) -> None: + def OnValueChange( + path: Attribute.TypedAttributePath, + transaction: Attribute.SubscriptionTransaction, + ) -> None: nonlocal sawValueChange self.logger.info("Saw value change!") - if (path.AttributeType == Clusters.TestCluster.Attributes.Int8u and path.Path.EndpointId == 1): + if ( + path.AttributeType == Clusters.TestCluster.Attributes.Int8u + and path.Path.EndpointId == 1 + ): sawValueChange = True self.logger.info("Testing CASE defunct logic") - sub = await self.devCtrl.ReadAttribute(nodeid, [(Clusters.TestCluster.Attributes.Int8u)], reportInterval=(0, 1)) + sub = await self.devCtrl.ReadAttribute( + nodeid, [(Clusters.TestCluster.Attributes.Int8u)], reportInterval=(0, 1) + ) sub.SetAttributeUpdateCallback(OnValueChange) # @@ -520,13 +796,17 @@ def OnValueChange(path: Attribute.TypedAttributePath, transaction: Attribute.Sub # Now write the attribute from fabric2, give it some time before checking if the report # was received. # - await self.devCtrl2.WriteAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.Int8u(4))]) + await self.devCtrl2.WriteAttribute( + nodeid, [(1, Clusters.TestCluster.Attributes.Int8u(4))] + ) time.sleep(2) sub.Shutdown() if sawValueChange is False: - self.logger.error("Didn't see value change in time, likely because sub got terminated due to unexpected session eviction!") + self.logger.error( + "Didn't see value change in time, likely because sub got terminated due to unexpected session eviction!" + ) return False # @@ -540,24 +820,32 @@ def OnValueChange(path: Attribute.TypedAttributePath, transaction: Attribute.Sub self.logger.info("Testing fabric-isolated CASE eviction") sawValueChange = False - sub = await self.devCtrl.ReadAttribute(nodeid, [(Clusters.TestCluster.Attributes.Int8u)], reportInterval=(0, 1)) + sub = await self.devCtrl.ReadAttribute( + nodeid, [(Clusters.TestCluster.Attributes.Int8u)], reportInterval=(0, 1) + ) sub.SetAttributeUpdateCallback(OnValueChange) for x in range(minimumSupportedFabrics * minimumCASESessionsPerFabric * 2): self.devCtrl2.CloseSession(nodeid) - await self.devCtrl2.ReadAttribute(nodeid, [(Clusters.Basic.Attributes.ClusterRevision)]) + await self.devCtrl2.ReadAttribute( + nodeid, [(Clusters.Basic.Attributes.ClusterRevision)] + ) # # Now write the attribute from fabric2, give it some time before checking if the report # was received. # - await self.devCtrl2.WriteAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.Int8u(4))]) + await self.devCtrl2.WriteAttribute( + nodeid, [(1, Clusters.TestCluster.Attributes.Int8u(4))] + ) time.sleep(2) sub.Shutdown() if sawValueChange is False: - self.logger.error("Didn't see value change in time, likely because sub got terminated due to other fabric (fabric1)") + self.logger.error( + "Didn't see value change in time, likely because sub got terminated due to other fabric (fabric1)" + ) return False # @@ -566,20 +854,28 @@ def OnValueChange(path: Attribute.TypedAttributePath, transaction: Attribute.Sub self.logger.info("Testing fabric-isolated CASE eviction (reverse)") sawValueChange = False - sub = await self.devCtrl2.ReadAttribute(nodeid, [(Clusters.TestCluster.Attributes.Int8u)], reportInterval=(0, 1)) + sub = await self.devCtrl2.ReadAttribute( + nodeid, [(Clusters.TestCluster.Attributes.Int8u)], reportInterval=(0, 1) + ) sub.SetAttributeUpdateCallback(OnValueChange) for x in range(minimumSupportedFabrics * minimumCASESessionsPerFabric * 2): self.devCtrl.CloseSession(nodeid) - await self.devCtrl.ReadAttribute(nodeid, [(Clusters.Basic.Attributes.ClusterRevision)]) + await self.devCtrl.ReadAttribute( + nodeid, [(Clusters.Basic.Attributes.ClusterRevision)] + ) - await self.devCtrl.WriteAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.Int8u(4))]) + await self.devCtrl.WriteAttribute( + nodeid, [(1, Clusters.TestCluster.Attributes.Int8u(4))] + ) time.sleep(2) sub.Shutdown() if sawValueChange is False: - self.logger.error("Didn't see value change in time, likely because sub got terminated due to other fabric (fabric2)") + self.logger.error( + "Didn't see value change in time, likely because sub got terminated due to other fabric (fabric2)" + ) return False return True @@ -587,65 +883,94 @@ def OnValueChange(path: Attribute.TypedAttributePath, transaction: Attribute.Sub async def TestMultiFabric(self, ip: str, setuppin: int, nodeid: int): self.logger.info("Opening Commissioning Window") - await self.devCtrl.SendCommand(nodeid, 0, Clusters.AdministratorCommissioning.Commands.OpenBasicCommissioningWindow(180), timedRequestTimeoutMs=10000) + await self.devCtrl.SendCommand( + nodeid, + 0, + Clusters.AdministratorCommissioning.Commands.OpenBasicCommissioningWindow( + 180 + ), + timedRequestTimeoutMs=10000, + ) self.logger.info("Creating 2nd Fabric Admin") - self.fabricAdmin2 = chip.FabricAdmin.FabricAdmin( - fabricId=2, fabricIndex=2) + self.fabricAdmin2 = chip.FabricAdmin.FabricAdmin(fabricId=2, fabricIndex=2) self.logger.info("Creating Device Controller on 2nd Fabric") self.devCtrl2 = self.fabricAdmin2.NewController( - self.controllerNodeId, self.paaTrustStorePath) + self.controllerNodeId, self.paaTrustStorePath + ) if not self.devCtrl2.CommissionIP(ip.encode("utf-8"), setuppin, nodeid): - self.logger.info( - "Failed to finish key exchange with device {}".format(ip)) + self.logger.info("Failed to finish key exchange with device {}".format(ip)) return False # # Shut-down all the controllers (which will free them up) # - self.logger.info( - "Shutting down controllers & fabrics and re-initing stack...") + self.logger.info("Shutting down controllers & fabrics and re-initing stack...") ChipDeviceCtrl.ChipDeviceController.ShutdownAll() chip.FabricAdmin.FabricAdmin.ShutdownAll() self.logger.info("Shutdown completed, starting new controllers...") - self.fabricAdmin = chip.FabricAdmin.FabricAdmin( - fabricId=1, fabricIndex=1) + self.fabricAdmin = chip.FabricAdmin.FabricAdmin(fabricId=1, fabricIndex=1) fabricAdmin2 = chip.FabricAdmin.FabricAdmin(fabricId=2, fabricIndex=2) self.devCtrl = self.fabricAdmin.NewController( - self.controllerNodeId, self.paaTrustStorePath) + self.controllerNodeId, self.paaTrustStorePath + ) self.devCtrl2 = fabricAdmin2.NewController( - self.controllerNodeId, self.paaTrustStorePath) + self.controllerNodeId, self.paaTrustStorePath + ) self.logger.info("Waiting for attribute reads...") - data1 = await self.devCtrl.ReadAttribute(nodeid, [(Clusters.OperationalCredentials.Attributes.NOCs)], fabricFiltered=False) - data2 = await self.devCtrl2.ReadAttribute(nodeid, [(Clusters.OperationalCredentials.Attributes.NOCs)], fabricFiltered=False) + data1 = await self.devCtrl.ReadAttribute( + nodeid, + [(Clusters.OperationalCredentials.Attributes.NOCs)], + fabricFiltered=False, + ) + data2 = await self.devCtrl2.ReadAttribute( + nodeid, + [(Clusters.OperationalCredentials.Attributes.NOCs)], + fabricFiltered=False, + ) # Read out noclist from each fabric, and each should contain two NOCs. - nocList1 = data1[0][Clusters.OperationalCredentials][Clusters.OperationalCredentials.Attributes.NOCs] - nocList2 = data2[0][Clusters.OperationalCredentials][Clusters.OperationalCredentials.Attributes.NOCs] + nocList1 = data1[0][Clusters.OperationalCredentials][ + Clusters.OperationalCredentials.Attributes.NOCs + ] + nocList2 = data2[0][Clusters.OperationalCredentials][ + Clusters.OperationalCredentials.Attributes.NOCs + ] - if (len(nocList1) != 2 or len(nocList2) != 2): + if len(nocList1) != 2 or len(nocList2) != 2: self.logger.error("Got back invalid nocList") return False - data1 = await self.devCtrl.ReadAttribute(nodeid, [(Clusters.OperationalCredentials.Attributes.CurrentFabricIndex)], fabricFiltered=False) - data2 = await self.devCtrl2.ReadAttribute(nodeid, [(Clusters.OperationalCredentials.Attributes.CurrentFabricIndex)], fabricFiltered=False) + data1 = await self.devCtrl.ReadAttribute( + nodeid, + [(Clusters.OperationalCredentials.Attributes.CurrentFabricIndex)], + fabricFiltered=False, + ) + data2 = await self.devCtrl2.ReadAttribute( + nodeid, + [(Clusters.OperationalCredentials.Attributes.CurrentFabricIndex)], + fabricFiltered=False, + ) # Read out current fabric from each fabric, and both should be different. self.currentFabric1 = data1[0][Clusters.OperationalCredentials][ - Clusters.OperationalCredentials.Attributes.CurrentFabricIndex] + Clusters.OperationalCredentials.Attributes.CurrentFabricIndex + ] self.currentFabric2 = data2[0][Clusters.OperationalCredentials][ - Clusters.OperationalCredentials.Attributes.CurrentFabricIndex] - if (self.currentFabric1 == self.currentFabric2): + Clusters.OperationalCredentials.Attributes.CurrentFabricIndex + ] + if self.currentFabric1 == self.currentFabric2: self.logger.error( - "Got back fabric indices that match for two different fabrics!") + "Got back fabric indices that match for two different fabrics!" + ) return False self.logger.info("Attribute reads completed...") @@ -654,14 +979,16 @@ async def TestMultiFabric(self, ip: str, setuppin: int, nodeid: int): async def TestFabricSensitive(self, nodeid: int): expectedDataFabric1 = [ Clusters.TestCluster.Structs.TestFabricScoped(), - Clusters.TestCluster.Structs.TestFabricScoped() + Clusters.TestCluster.Structs.TestFabricScoped(), ] expectedDataFabric1[0].fabricIndex = 100 expectedDataFabric1[0].fabricSensitiveInt8u = 33 expectedDataFabric1[0].optionalFabricSensitiveInt8u = 34 expectedDataFabric1[0].nullableFabricSensitiveInt8u = 35 - expectedDataFabric1[0].nullableOptionalFabricSensitiveInt8u = Clusters.Types.NullValue + expectedDataFabric1[ + 0 + ].nullableOptionalFabricSensitiveInt8u = Clusters.Types.NullValue expectedDataFabric1[0].fabricSensitiveCharString = "alpha1" expectedDataFabric1[0].fabricSensitiveStruct.a = 36 expectedDataFabric1[0].fabricSensitiveInt8uList = [1, 2, 3, 4] @@ -670,14 +997,26 @@ async def TestFabricSensitive(self, nodeid: int): expectedDataFabric1[1].fabricSensitiveInt8u = 43 expectedDataFabric1[1].optionalFabricSensitiveInt8u = 44 expectedDataFabric1[1].nullableFabricSensitiveInt8u = 45 - expectedDataFabric1[1].nullableOptionalFabricSensitiveInt8u = Clusters.Types.NullValue + expectedDataFabric1[ + 1 + ].nullableOptionalFabricSensitiveInt8u = Clusters.Types.NullValue expectedDataFabric1[1].fabricSensitiveCharString = "alpha2" expectedDataFabric1[1].fabricSensitiveStruct.a = 46 expectedDataFabric1[1].fabricSensitiveInt8uList = [2, 3, 4, 5] self.logger.info("Writing data from fabric1...") - await self.devCtrl.WriteAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped(expectedDataFabric1))]) + await self.devCtrl.WriteAttribute( + nodeid, + [ + ( + 1, + Clusters.TestCluster.Attributes.ListFabricScoped( + expectedDataFabric1 + ), + ) + ], + ) expectedDataFabric2 = copy.deepcopy(expectedDataFabric1) @@ -698,15 +1037,29 @@ async def TestFabricSensitive(self, nodeid: int): self.logger.info("Writing data from fabric2...") - await self.devCtrl2.WriteAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped(expectedDataFabric2))]) + await self.devCtrl2.WriteAttribute( + nodeid, + [ + ( + 1, + Clusters.TestCluster.Attributes.ListFabricScoped( + expectedDataFabric2 + ), + ) + ], + ) # # Now read the data back filtered from fabric1 and ensure it matches. # self.logger.info("Reading back data from fabric1...") - data = await self.devCtrl.ReadAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped)]) - readListDataFabric1 = data[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.ListFabricScoped] + data = await self.devCtrl.ReadAttribute( + nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped)] + ) + readListDataFabric1 = data[1][Clusters.TestCluster][ + Clusters.TestCluster.Attributes.ListFabricScoped + ] # # Update the expected data's fabric index to that we just read back @@ -716,13 +1069,17 @@ async def TestFabricSensitive(self, nodeid: int): expectedDataFabric1[1].fabricIndex = self.currentFabric1 self.logger.info("Comparing data on fabric1...") - if (expectedDataFabric1 != readListDataFabric1): + if expectedDataFabric1 != readListDataFabric1: raise AssertionError("Got back mismatched data") self.logger.info("Reading back data from fabric2...") - data = await self.devCtrl2.ReadAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped)]) - readListDataFabric2 = data[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.ListFabricScoped] + data = await self.devCtrl2.ReadAttribute( + nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped)] + ) + readListDataFabric2 = data[1][Clusters.TestCluster][ + Clusters.TestCluster.Attributes.ListFabricScoped + ] # # Update the expected data's fabric index to that we just read back @@ -732,25 +1089,26 @@ async def TestFabricSensitive(self, nodeid: int): expectedDataFabric2[1].fabricIndex = self.currentFabric2 self.logger.info("Comparing data on fabric2...") - if (expectedDataFabric2 != readListDataFabric2): + if expectedDataFabric2 != readListDataFabric2: raise AssertionError("Got back mismatched data") self.logger.info( - "Reading back unfiltered data across all fabrics from fabric1...") + "Reading back unfiltered data across all fabrics from fabric1..." + ) def CompareUnfilteredData(accessingFabric, otherFabric, expectedData): index = 0 self.logger.info( - f"Comparing data from accessing fabric {accessingFabric}...") + f"Comparing data from accessing fabric {accessingFabric}..." + ) for item in readListDataFabric: - if (item.fabricIndex == accessingFabric): - if (index == 2): - raise AssertionError( - "Got back more data than expected") + if item.fabricIndex == accessingFabric: + if index == 2: + raise AssertionError("Got back more data than expected") - if (item != expectedData[index]): + if item != expectedData[index]: raise AssertionError("Got back mismatched data") index = index + 1 @@ -762,21 +1120,37 @@ def CompareUnfilteredData(accessingFabric, otherFabric, expectedData): # which should automatically be initialized with defaults and compare that # against what we got back. # - expectedDefaultData = Clusters.TestCluster.Structs.TestFabricScoped() + expectedDefaultData = ( + Clusters.TestCluster.Structs.TestFabricScoped() + ) expectedDefaultData.fabricIndex = otherFabric - if (item != expectedDefaultData): + if item != expectedDefaultData: raise AssertionError("Got back mismatched data") - data = await self.devCtrl.ReadAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped)], fabricFiltered=False) - readListDataFabric = data[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.ListFabricScoped] - CompareUnfilteredData(self.currentFabric1, - self.currentFabric2, expectedDataFabric1) - - data = await self.devCtrl2.ReadAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped)], fabricFiltered=False) - readListDataFabric = data[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.ListFabricScoped] - CompareUnfilteredData(self.currentFabric2, - self.currentFabric1, expectedDataFabric2) + data = await self.devCtrl.ReadAttribute( + nodeid, + [(1, Clusters.TestCluster.Attributes.ListFabricScoped)], + fabricFiltered=False, + ) + readListDataFabric = data[1][Clusters.TestCluster][ + Clusters.TestCluster.Attributes.ListFabricScoped + ] + CompareUnfilteredData( + self.currentFabric1, self.currentFabric2, expectedDataFabric1 + ) + + data = await self.devCtrl2.ReadAttribute( + nodeid, + [(1, Clusters.TestCluster.Attributes.ListFabricScoped)], + fabricFiltered=False, + ) + readListDataFabric = data[1][Clusters.TestCluster][ + Clusters.TestCluster.Attributes.ListFabricScoped + ] + CompareUnfilteredData( + self.currentFabric2, self.currentFabric1, expectedDataFabric2 + ) self.logger.info("Writing smaller list from alpha (again)") @@ -784,32 +1158,54 @@ def CompareUnfilteredData(accessingFabric, otherFabric, expectedData): expectedDataFabric1[0].fabricSensitiveInt8u = 53 expectedDataFabric1[0].optionalFabricSensitiveInt8u = 54 expectedDataFabric1[0].nullableFabricSensitiveInt8u = 55 - expectedDataFabric1[0].nullableOptionalFabricSensitiveInt8u = Clusters.Types.NullValue + expectedDataFabric1[ + 0 + ].nullableOptionalFabricSensitiveInt8u = Clusters.Types.NullValue expectedDataFabric1[0].fabricSensitiveCharString = "alpha3" expectedDataFabric1[0].fabricSensitiveStruct.a = 56 expectedDataFabric1[0].fabricSensitiveInt8uList = [51, 52, 53, 54] expectedDataFabric1.pop(1) - await self.devCtrl.WriteAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped(expectedDataFabric1))]) + await self.devCtrl.WriteAttribute( + nodeid, + [ + ( + 1, + Clusters.TestCluster.Attributes.ListFabricScoped( + expectedDataFabric1 + ), + ) + ], + ) self.logger.info( - "Reading back data (again) from fabric2 to ensure it hasn't changed") - - data = await self.devCtrl2.ReadAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped)]) - readListDataFabric2 = data[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.ListFabricScoped] - if (expectedDataFabric2 != readListDataFabric2): + "Reading back data (again) from fabric2 to ensure it hasn't changed" + ) + + data = await self.devCtrl2.ReadAttribute( + nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped)] + ) + readListDataFabric2 = data[1][Clusters.TestCluster][ + Clusters.TestCluster.Attributes.ListFabricScoped + ] + if expectedDataFabric2 != readListDataFabric2: raise AssertionError("Got back mismatched data") self.logger.info( - "Reading back data (again) from fabric1 to ensure it hasn't changed") - - data = await self.devCtrl.ReadAttribute(nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped)]) - readListDataFabric1 = data[1][Clusters.TestCluster][Clusters.TestCluster.Attributes.ListFabricScoped] + "Reading back data (again) from fabric1 to ensure it hasn't changed" + ) + + data = await self.devCtrl.ReadAttribute( + nodeid, [(1, Clusters.TestCluster.Attributes.ListFabricScoped)] + ) + readListDataFabric1 = data[1][Clusters.TestCluster][ + Clusters.TestCluster.Attributes.ListFabricScoped + ] self.logger.info("Comparing data on fabric1...") expectedDataFabric1[0].fabricIndex = self.currentFabric1 - if (expectedDataFabric1 != readListDataFabric1): + if expectedDataFabric1 != readListDataFabric1: raise AssertionError("Got back mismatched data") def TestCloseSession(self, nodeid: int): @@ -818,12 +1214,14 @@ def TestCloseSession(self, nodeid: int): err = self.devCtrl.CloseSession(nodeid) if err != 0: self.logger.exception( - f"Failed to close sessions with device {nodeid}: {err}") + f"Failed to close sessions with device {nodeid}: {err}" + ) return False return True except Exception as ex: self.logger.exception( - f"Failed to close sessions with device {nodeid}: {ex}") + f"Failed to close sessions with device {nodeid}: {ex}" + ) return False def SetNetworkCommissioningParameters(self, dataset: str): @@ -833,48 +1231,78 @@ def SetNetworkCommissioningParameters(self, dataset: str): def TestOnOffCluster(self, nodeid: int, endpoint: int, group: int): self.logger.info( - "Sending On/Off commands to device {} endpoint {}".format(nodeid, endpoint)) - err, resp = self.devCtrl.ZCLSend("OnOff", "On", nodeid, - endpoint, group, {}, blocking=True) + "Sending On/Off commands to device {} endpoint {}".format(nodeid, endpoint) + ) + err, resp = self.devCtrl.ZCLSend( + "OnOff", "On", nodeid, endpoint, group, {}, blocking=True + ) if err != 0: self.logger.error( - "failed to send OnOff.On: error is {} with im response{}".format(err, resp)) + "failed to send OnOff.On: error is {} with im response{}".format( + err, resp + ) + ) return False - err, resp = self.devCtrl.ZCLSend("OnOff", "Off", nodeid, - endpoint, group, {}, blocking=True) + err, resp = self.devCtrl.ZCLSend( + "OnOff", "Off", nodeid, endpoint, group, {}, blocking=True + ) if err != 0: self.logger.error( - "failed to send OnOff.Off: error is {} with im response {}".format(err, resp)) + "failed to send OnOff.Off: error is {} with im response {}".format( + err, resp + ) + ) return False return True def TestLevelControlCluster(self, nodeid: int, endpoint: int, group: int): self.logger.info( - f"Sending MoveToLevel command to device {nodeid} endpoint {endpoint}") + f"Sending MoveToLevel command to device {nodeid} endpoint {endpoint}" + ) try: commonArgs = dict(transitionTime=0, optionMask=1, optionOverride=1) # Move to 1 - self.devCtrl.ZCLSend("LevelControl", "MoveToLevel", nodeid, - endpoint, group, dict(**commonArgs, level=1), blocking=True) - res = self.devCtrl.ZCLReadAttribute(cluster="LevelControl", - attribute="CurrentLevel", - nodeid=nodeid, - endpoint=endpoint, - groupid=group) - TestResult("Read attribute LevelControl.CurrentLevel", - res).assertValueEqual(1) + self.devCtrl.ZCLSend( + "LevelControl", + "MoveToLevel", + nodeid, + endpoint, + group, + dict(**commonArgs, level=1), + blocking=True, + ) + res = self.devCtrl.ZCLReadAttribute( + cluster="LevelControl", + attribute="CurrentLevel", + nodeid=nodeid, + endpoint=endpoint, + groupid=group, + ) + TestResult( + "Read attribute LevelControl.CurrentLevel", res + ).assertValueEqual(1) # Move to 254 - self.devCtrl.ZCLSend("LevelControl", "MoveToLevel", nodeid, - endpoint, group, dict(**commonArgs, level=254), blocking=True) - res = self.devCtrl.ZCLReadAttribute(cluster="LevelControl", - attribute="CurrentLevel", - nodeid=nodeid, - endpoint=endpoint, - groupid=group) - TestResult("Read attribute LevelControl.CurrentLevel", - res).assertValueEqual(254) + self.devCtrl.ZCLSend( + "LevelControl", + "MoveToLevel", + nodeid, + endpoint, + group, + dict(**commonArgs, level=254), + blocking=True, + ) + res = self.devCtrl.ZCLReadAttribute( + cluster="LevelControl", + attribute="CurrentLevel", + nodeid=nodeid, + endpoint=endpoint, + groupid=group, + ) + TestResult( + "Read attribute LevelControl.CurrentLevel", res + ).assertValueEqual(254) return True except Exception as ex: @@ -882,8 +1310,7 @@ def TestLevelControlCluster(self, nodeid: int, endpoint: int, group: int): return False def TestResolve(self, nodeid): - self.logger.info( - "Resolve: node id = {:08x}".format(nodeid)) + self.logger.info("Resolve: node id = {:08x}".format(nodeid)) try: self.devCtrl.ResolveNode(nodeid=nodeid) addr = None @@ -923,13 +1350,16 @@ def TestReadBasicAttributes(self, nodeid: int, endpoint: int, group: int): failed_zcl = {} for basic_attr, expected_value in basic_cluster_attrs.items(): try: - res = self.devCtrl.ZCLReadAttribute(cluster="Basic", - attribute=basic_attr, - nodeid=nodeid, - endpoint=endpoint, - groupid=group) + res = self.devCtrl.ZCLReadAttribute( + cluster="Basic", + attribute=basic_attr, + nodeid=nodeid, + endpoint=endpoint, + groupid=group, + ) TestResult(f"Read attribute {basic_attr}", res).assertValueEqual( - expected_value) + expected_value + ) except Exception as ex: failed_zcl[basic_attr] = str(ex) if failed_zcl: @@ -947,31 +1377,44 @@ class AttributeWriteRequest: requests = [ AttributeWriteRequest("Basic", "NodeLabel", "Test"), - AttributeWriteRequest("Basic", "Location", - "a pretty loooooooooooooog string", IM.Status.InvalidValue), + AttributeWriteRequest( + "Basic", + "Location", + "a pretty loooooooooooooog string", + IM.Status.InvalidValue, + ), ] failed_zcl = [] for req in requests: try: try: - self.devCtrl.ZCLWriteAttribute(cluster=req.cluster, - attribute=req.attribute, - nodeid=nodeid, - endpoint=endpoint, - groupid=group, - value=req.value) + self.devCtrl.ZCLWriteAttribute( + cluster=req.cluster, + attribute=req.attribute, + nodeid=nodeid, + endpoint=endpoint, + groupid=group, + value=req.value, + ) if req.expected_status != IM.Status.Success: raise AssertionError( - f"Write attribute {req.cluster}.{req.attribute} expects failure but got success response") + f"Write attribute {req.cluster}.{req.attribute} expects failure but got success response" + ) except Exception as ex: if req.expected_status != IM.Status.Success: continue else: raise ex res = self.devCtrl.ZCLReadAttribute( - cluster=req.cluster, attribute=req.attribute, nodeid=nodeid, endpoint=endpoint, groupid=group) - TestResult(f"Read attribute {req.cluster}.{req.attribute}", res).assertValueEqual( - req.value) + cluster=req.cluster, + attribute=req.attribute, + nodeid=nodeid, + endpoint=endpoint, + groupid=group, + ) + TestResult( + f"Read attribute {req.cluster}.{req.attribute}", res + ).assertValueEqual(req.value) except Exception as ex: failed_zcl.append(str(ex)) if failed_zcl: @@ -985,20 +1428,29 @@ def TestSubscription(self, nodeid: int, endpoint: int): updateLock = threading.Lock() updateCv = threading.Condition(updateLock) - def OnValueChange(path: Attribute.TypedAttributePath, transaction: Attribute.SubscriptionTransaction) -> None: + def OnValueChange( + path: Attribute.TypedAttributePath, + transaction: Attribute.SubscriptionTransaction, + ) -> None: nonlocal desiredPath, updateCv, updateLock, receivedUpdate if path.Path != desiredPath: return data = transaction.GetAttribute(path) logger.info( - f"Received report from server: path: {path.Path}, value: {data}") + f"Received report from server: path: {path.Path}, value: {data}" + ) with updateLock: receivedUpdate += 1 updateCv.notify_all() class _conductAttributeChange(threading.Thread): - def __init__(self, devCtrl: ChipDeviceCtrl.ChipDeviceController, nodeid: int, endpoint: int): + def __init__( + self, + devCtrl: ChipDeviceCtrl.ChipDeviceController, + nodeid: int, + endpoint: int, + ): super(_conductAttributeChange, self).__init__() self.nodeid = nodeid self.endpoint = endpoint @@ -1008,17 +1460,19 @@ def run(self): for i in range(5): time.sleep(3) self.devCtrl.ZCLSend( - "OnOff", "Toggle", self.nodeid, self.endpoint, 0, {}) + "OnOff", "Toggle", self.nodeid, self.endpoint, 0, {} + ) try: desiredPath = Clusters.Attribute.AttributePath( - EndpointId=1, ClusterId=6, AttributeId=0) + EndpointId=1, ClusterId=6, AttributeId=0 + ) # OnOff Cluster, OnOff Attribute subscription = self.devCtrl.ZCLSubscribeAttribute( - "OnOff", "OnOff", nodeid, endpoint, 1, 10) + "OnOff", "OnOff", nodeid, endpoint, 1, 10 + ) subscription.SetAttributeUpdateCallback(OnValueChange) - changeThread = _conductAttributeChange( - self.devCtrl, nodeid, endpoint) + changeThread = _conductAttributeChange(self.devCtrl, nodeid, endpoint) # Reset the number of subscriptions received as subscribing causes a callback. changeThread.start() with updateCv: @@ -1027,8 +1481,7 @@ def run(self): # The changing thread will change the value after 3 seconds. If we're waiting more than 10, assume something # is really wrong and bail out here with some information. if not updateCv.wait(10.0): - self.logger.error( - f"Failed to receive subscription update") + self.logger.error(f"Failed to receive subscription update") break # thread changes 5 times, and sleeps for 3 seconds in between. Add an additional 3 seconds of slack. Timeout is in seconds. @@ -1054,16 +1507,17 @@ def run(self): return True def TestNonControllerAPIs(self): - ''' + """ This function validates various APIs provided by chip package which is not related to controller. TODO: Add more tests for APIs - ''' + """ try: cluster = self.devCtrl.GetClusterHandler() clusterInfo = cluster.GetClusterInfoById(0xFFF1FC05) # TestCluster if clusterInfo["clusterName"] != "TestCluster": raise Exception( - f"Wrong cluster info clusterName: {clusterInfo['clusterName']} expected TestCluster") + f"Wrong cluster info clusterName: {clusterInfo['clusterName']} expected TestCluster" + ) except Exception as ex: self.logger.exception(f"Failed to finish API test: {ex}") return False diff --git a/src/controller/python/test/test_scripts/mobile-device-test.py b/src/controller/python/test/test_scripts/mobile-device-test.py index a2f470763738e5..c08572aa88a424 100755 --- a/src/controller/python/test/test_scripts/mobile-device-test.py +++ b/src/controller/python/test/test_scripts/mobile-device-test.py @@ -25,7 +25,15 @@ import coloredlogs import chip.logging import logging -from base import TestFail, TestTimeout, BaseTestHelper, FailIfNot, logger, TestIsEnabled, SetTestSet +from base import ( + TestFail, + TestTimeout, + BaseTestHelper, + FailIfNot, + logger, + TestIsEnabled, + SetTestSet, +) import base from cluster_objects import NODE_ID, ClusterObjectTests from network_commissioning import NetworkCommissioningTests @@ -33,15 +41,17 @@ # The thread network dataset tlv for testing, splited into T-L-V. -TEST_THREAD_NETWORK_DATASET_TLV = "0e080000000000010000" + \ - "000300000c" + \ - "35060004001fffe0" + \ - "0208fedcba9876543210" + \ - "0708fd00000000001234" + \ - "0510ffeeddccbbaa99887766554433221100" + \ - "030e54657374696e674e6574776f726b" + \ - "0102d252" + \ - "041081cb3b2efa781cc778397497ff520fa50c0302a0ff" +TEST_THREAD_NETWORK_DATASET_TLV = ( + "0e080000000000010000" + + "000300000c" + + "35060004001fffe0" + + "0208fedcba9876543210" + + "0708fd00000000001234" + + "0510ffeeddccbbaa99887766554433221100" + + "030e54657374696e674e6574776f726b" + + "0102d252" + + "041081cb3b2efa781cc778397497ff520fa50c0302a0ff" +) # Network id, for the thread network, current a const value, will be changed to XPANID of the thread network. TEST_THREAD_NETWORK_ID = "fedcba9876543210" TEST_DISCRIMINATOR = 3840 @@ -54,10 +64,16 @@ TEST_CONTROLLER_NODE_ID = 112233 TEST_DEVICE_NODE_ID = 1 -ALL_TESTS = ['network_commissioning', 'datamodel'] +ALL_TESTS = ["network_commissioning", "datamodel"] -def ethernet_commissioning(test: BaseTestHelper, discriminator: int, setup_pin: int, address_override: str, device_nodeid: int): +def ethernet_commissioning( + test: BaseTestHelper, + discriminator: int, + setup_pin: int, + address_override: str, + device_nodeid: int, +): logger.info("Testing discovery") address = test.TestDiscovery(discriminator=discriminator) FailIfNot(address, "Failed to discover any devices.") @@ -71,21 +87,23 @@ def ethernet_commissioning(test: BaseTestHelper, discriminator: int, setup_pin: address = address.decode("utf-8") logger.info("Testing commissioning") - FailIfNot(test.TestCommissioning(ip=address, - setuppin=setup_pin, - nodeid=device_nodeid), - "Failed to finish key exchange") - - ok = asyncio.run(test.TestMultiFabric(ip=address, - setuppin=20202021, - nodeid=1)) + FailIfNot( + test.TestCommissioning(ip=address, setuppin=setup_pin, nodeid=device_nodeid), + "Failed to finish key exchange", + ) + + ok = asyncio.run(test.TestMultiFabric(ip=address, setuppin=20202021, nodeid=1)) FailIfNot(ok, "Failed to commission multi-fabric") - FailIfNot(asyncio.run(test.TestAddUpdateRemoveFabric(nodeid=device_nodeid)), - "Failed AddUpdateRemoveFabric test") + FailIfNot( + asyncio.run(test.TestAddUpdateRemoveFabric(nodeid=device_nodeid)), + "Failed AddUpdateRemoveFabric test", + ) logger.info("Testing CASE Eviction") - FailIfNot(asyncio.run(test.TestCaseEviction(device_nodeid)), "Failed TestCaseEviction") + FailIfNot( + asyncio.run(test.TestCaseEviction(device_nodeid)), "Failed TestCaseEviction" + ) logger.info("Testing closing sessions") FailIfNot(test.TestCloseSession(nodeid=device_nodeid), "Failed to close sessions") @@ -96,80 +114,110 @@ def TestDatamodel(test: BaseTestHelper, device_nodeid: int): logger.info("Testing datamodel functions") logger.info("Testing on off cluster") - FailIfNot(test.TestOnOffCluster(nodeid=device_nodeid, - endpoint=LIGHTING_ENDPOINT_ID, - group=GROUP_ID), "Failed to test on off cluster") + FailIfNot( + test.TestOnOffCluster( + nodeid=device_nodeid, endpoint=LIGHTING_ENDPOINT_ID, group=GROUP_ID + ), + "Failed to test on off cluster", + ) logger.info("Testing level control cluster") - FailIfNot(test.TestLevelControlCluster(nodeid=device_nodeid, - endpoint=LIGHTING_ENDPOINT_ID, - group=GROUP_ID), - "Failed to test level control cluster") + FailIfNot( + test.TestLevelControlCluster( + nodeid=device_nodeid, endpoint=LIGHTING_ENDPOINT_ID, group=GROUP_ID + ), + "Failed to test level control cluster", + ) logger.info("Testing sending commands to non exist endpoint") - FailIfNot(not test.TestOnOffCluster(nodeid=device_nodeid, - endpoint=233, - group=GROUP_ID), "Failed to test on off cluster on non-exist endpoint") + FailIfNot( + not test.TestOnOffCluster(nodeid=device_nodeid, endpoint=233, group=GROUP_ID), + "Failed to test on off cluster on non-exist endpoint", + ) # Test experimental Python cluster objects API logger.info("Testing cluster objects API") - FailIfNot(asyncio.run(ClusterObjectTests.RunTest(test.devCtrl)), - "Failed when testing Python Cluster Object APIs") + FailIfNot( + asyncio.run(ClusterObjectTests.RunTest(test.devCtrl)), + "Failed when testing Python Cluster Object APIs", + ) logger.info("Testing attribute reading") - FailIfNot(test.TestReadBasicAttributes(nodeid=device_nodeid, - endpoint=ENDPOINT_ID, - group=GROUP_ID), - "Failed to test Read Basic Attributes") + FailIfNot( + test.TestReadBasicAttributes( + nodeid=device_nodeid, endpoint=ENDPOINT_ID, group=GROUP_ID + ), + "Failed to test Read Basic Attributes", + ) logger.info("Testing attribute writing") - FailIfNot(test.TestWriteBasicAttributes(nodeid=device_nodeid, - endpoint=ENDPOINT_ID, - group=GROUP_ID), - "Failed to test Write Basic Attributes") + FailIfNot( + test.TestWriteBasicAttributes( + nodeid=device_nodeid, endpoint=ENDPOINT_ID, group=GROUP_ID + ), + "Failed to test Write Basic Attributes", + ) logger.info("Testing attribute reading basic again") - FailIfNot(test.TestReadBasicAttributes(nodeid=1, - endpoint=ENDPOINT_ID, - group=GROUP_ID), - "Failed to test Read Basic Attributes") + FailIfNot( + test.TestReadBasicAttributes(nodeid=1, endpoint=ENDPOINT_ID, group=GROUP_ID), + "Failed to test Read Basic Attributes", + ) logger.info("Testing subscription") - FailIfNot(test.TestSubscription(nodeid=device_nodeid, endpoint=LIGHTING_ENDPOINT_ID), - "Failed to subscribe attributes.") + FailIfNot( + test.TestSubscription(nodeid=device_nodeid, endpoint=LIGHTING_ENDPOINT_ID), + "Failed to subscribe attributes.", + ) logger.info("Testing another subscription that kills previous subscriptions") - FailIfNot(test.TestSubscription(nodeid=device_nodeid, endpoint=LIGHTING_ENDPOINT_ID), - "Failed to subscribe attributes.") + FailIfNot( + test.TestSubscription(nodeid=device_nodeid, endpoint=LIGHTING_ENDPOINT_ID), + "Failed to subscribe attributes.", + ) logger.info("Testing on off cluster over resolved connection") - FailIfNot(test.TestOnOffCluster(nodeid=device_nodeid, - endpoint=LIGHTING_ENDPOINT_ID, - group=GROUP_ID), "Failed to test on off cluster") + FailIfNot( + test.TestOnOffCluster( + nodeid=device_nodeid, endpoint=LIGHTING_ENDPOINT_ID, group=GROUP_ID + ), + "Failed to test on off cluster", + ) logger.info("Testing writing/reading fabric sensitive data") asyncio.run(test.TestFabricSensitive(nodeid=device_nodeid)) -def do_tests(controller_nodeid, device_nodeid, address, timeout, discriminator, setup_pin, paa_trust_store_path): +def do_tests( + controller_nodeid, + device_nodeid, + address, + timeout, + discriminator, + setup_pin, + paa_trust_store_path, +): timeoutTicker = TestTimeout(timeout) timeoutTicker.start() - test = BaseTestHelper(nodeid=controller_nodeid, - paaTrustStorePath=paa_trust_store_path) + test = BaseTestHelper( + nodeid=controller_nodeid, paaTrustStorePath=paa_trust_store_path + ) chip.logging.RedirectToPythonLogging() - ethernet_commissioning(test, discriminator, setup_pin, address, - device_nodeid) + ethernet_commissioning(test, discriminator, setup_pin, address, device_nodeid) logger.info("Testing resolve") - FailIfNot(test.TestResolve(nodeid=device_nodeid), - "Failed to resolve nodeid") + FailIfNot(test.TestResolve(nodeid=device_nodeid), "Failed to resolve nodeid") # Still test network commissioning - FailIfNot(asyncio.run(NetworkCommissioningTests(devCtrl=test.devCtrl, nodeid=device_nodeid).run()), - "Failed to finish network commissioning") + FailIfNot( + asyncio.run( + NetworkCommissioningTests(devCtrl=test.devCtrl, nodeid=device_nodeid).run() + ), + "Failed to finish network commissioning", + ) TestDatamodel(test, device_nodeid) @@ -186,19 +234,87 @@ def do_tests(controller_nodeid, device_nodeid, address, timeout, discriminator, @click.command() -@click.option("--controller-nodeid", default=TEST_CONTROLLER_NODE_ID, type=int, help="NodeId of the controller.") -@click.option("--device-nodeid", default=TEST_DEVICE_NODE_ID, type=int, help="NodeId of the device.") -@click.option("--address", "-a", default='', type=str, help="Skip commissionee discovery, commission the device with the IP directly.") -@click.option("--timeout", "-t", default=240, type=int, help="The program will return with timeout after specified seconds.") -@click.option("--discriminator", default=TEST_DISCRIMINATOR, type=int, help="Discriminator of the device.") -@click.option("--setup-pin", default=TEST_SETUPPIN, type=int, help="Setup pincode of the device.") -@click.option('--enable-test', default=['all'], type=str, multiple=True, help='The tests to be executed. By default, all tests will be executed, use this option to run a specific set of tests. Use --print-test-list for a list of appliable tests.') -@click.option('--disable-test', default=[], type=str, multiple=True, help='The tests to be excluded from the set of enabled tests. Use --print-test-list for a list of appliable tests.') -@click.option('--log-level', default='WARN', type=click.Choice(['ERROR', 'WARN', 'INFO', 'DEBUG']), help="The log level of the test.") -@click.option('--log-format', default=None, type=str, help="Override logging format") -@click.option('--print-test-list', is_flag=True, help="Print a list of test cases and test sets that can be toggled via --enable-test and --disable-test, then exit") -@click.option('--paa-trust-store-path', default='', type=str, help="Path that contains valid and trusted PAA Root Certificates.") -def run(controller_nodeid, device_nodeid, address, timeout, discriminator, setup_pin, enable_test, disable_test, log_level, log_format, print_test_list, paa_trust_store_path): +@click.option( + "--controller-nodeid", + default=TEST_CONTROLLER_NODE_ID, + type=int, + help="NodeId of the controller.", +) +@click.option( + "--device-nodeid", + default=TEST_DEVICE_NODE_ID, + type=int, + help="NodeId of the device.", +) +@click.option( + "--address", + "-a", + default="", + type=str, + help="Skip commissionee discovery, commission the device with the IP directly.", +) +@click.option( + "--timeout", + "-t", + default=240, + type=int, + help="The program will return with timeout after specified seconds.", +) +@click.option( + "--discriminator", + default=TEST_DISCRIMINATOR, + type=int, + help="Discriminator of the device.", +) +@click.option( + "--setup-pin", default=TEST_SETUPPIN, type=int, help="Setup pincode of the device." +) +@click.option( + "--enable-test", + default=["all"], + type=str, + multiple=True, + help="The tests to be executed. By default, all tests will be executed, use this option to run a specific set of tests. Use --print-test-list for a list of appliable tests.", +) +@click.option( + "--disable-test", + default=[], + type=str, + multiple=True, + help="The tests to be excluded from the set of enabled tests. Use --print-test-list for a list of appliable tests.", +) +@click.option( + "--log-level", + default="WARN", + type=click.Choice(["ERROR", "WARN", "INFO", "DEBUG"]), + help="The log level of the test.", +) +@click.option("--log-format", default=None, type=str, help="Override logging format") +@click.option( + "--print-test-list", + is_flag=True, + help="Print a list of test cases and test sets that can be toggled via --enable-test and --disable-test, then exit", +) +@click.option( + "--paa-trust-store-path", + default="", + type=str, + help="Path that contains valid and trusted PAA Root Certificates.", +) +def run( + controller_nodeid, + device_nodeid, + address, + timeout, + discriminator, + setup_pin, + enable_test, + disable_test, + log_level, + log_format, + print_test_list, + paa_trust_store_path, +): coloredlogs.install(level=log_level, fmt=log_format, logger=logger) if print_test_list: @@ -218,8 +334,15 @@ def run(controller_nodeid, device_nodeid, address, timeout, discriminator, setup logger.info(f"\tEnabled Tests: {enable_test}") logger.info(f"\tDisabled Tests: {disable_test}") SetTestSet(enable_test, disable_test) - do_tests(controller_nodeid, device_nodeid, address, timeout, - discriminator, setup_pin, paa_trust_store_path) + do_tests( + controller_nodeid, + device_nodeid, + address, + timeout, + discriminator, + setup_pin, + paa_trust_store_path, + ) if __name__ == "__main__": diff --git a/src/controller/tests/data_model/TestRead.cpp b/src/controller/tests/data_model/TestRead.cpp index 6c1f85cf686cf6..53ab01e7682793 100644 --- a/src/controller/tests/data_model/TestRead.cpp +++ b/src/controller/tests/data_model/TestRead.cpp @@ -61,14 +61,14 @@ uint8_t expectedAttribute4[256] = { enum ResponseDirective { kSendDataResponse, - kSendManyDataResponses, // Many data blocks, for a single concrete path - // read, simulating a malicious server. + kSendManyDataResponses, // Many data blocks, for a single concrete path + // read, simulating a malicious server. kSendManyDataResponsesWrongPath, // Many data blocks, all using the wrong - // path, for a single concrete path - // read, simulating a malicious server. + // path, for a single concrete path + // read, simulating a malicious server. kSendDataError, kSendTwoDataErrors, // Multiple errors, for a single concrete path, - // simulating a malicious server. + // simulating a malicious server. }; ResponseDirective responseDirective; diff --git a/src/darwin/Framework/CHIP/MTRAttestationTrustStoreBridge.mm b/src/darwin/Framework/CHIP/MTRAttestationTrustStoreBridge.mm index ee88d420624d4a..7c74ccc28752df 100644 --- a/src/darwin/Framework/CHIP/MTRAttestationTrustStoreBridge.mm +++ b/src/darwin/Framework/CHIP/MTRAttestationTrustStoreBridge.mm @@ -17,7 +17,9 @@ #import "MTRAttestationTrustStoreBridge.h" -static chip::ByteSpan asByteSpan(NSData * value) { return chip::ByteSpan(static_cast(value.bytes), value.length); } +static chip::ByteSpan asByteSpan(NSData * value) { + return chip::ByteSpan(static_cast(value.bytes), value.length); +} CHIP_ERROR MTRAttestationTrustStoreBridge::GetProductAttestationAuthorityCert( const chip::ByteSpan & skid, chip::MutableByteSpan & outPaaDerBuffer) const diff --git a/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.mm b/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.mm index eccdb418e19cf0..1089c054901fb4 100644 --- a/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.mm +++ b/src/darwin/Framework/CHIP/MTRAttributeCacheContainer.mm @@ -43,8 +43,8 @@ - (instancetype)init } - (void)setXPCConnection:(MTRDeviceControllerXPCConnection *)xpcConnection - controllerId:(id)controllerId - deviceId:(uint64_t)deviceId + controllerId:(id)controllerId + deviceId:(uint64_t)deviceId { self.xpcConnection = xpcConnection; self.xpcControllerId = controllerId; @@ -65,28 +65,28 @@ static CHIP_ERROR AppendAttibuteValueToArray( } MTR_LOG_ERROR("Error: Cached value could not be converted to generic NSObject"); [array addObject:@ { - MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:path], - MTRErrorKey : [MTRError errorForCHIPErrorCode:CHIP_ERROR_DECODE_FAILED] - }]; + MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:path], + MTRErrorKey : [MTRError errorForCHIPErrorCode:CHIP_ERROR_DECODE_FAILED] + }]; return CHIP_ERROR_DECODE_FAILED; } MTR_LOG_ERROR("Error: Failed to read from attribute cache: %s", err.AsString()); [array addObject:@ { - MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:path], - MTRErrorKey : [MTRError errorForCHIPErrorCode:err] - }]; + MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:path], + MTRErrorKey : [MTRError errorForCHIPErrorCode:err] + }]; return err; } - (void)readAttributeWithEndpointId:(NSNumber * _Nullable)endpointId - clusterId:(NSNumber * _Nullable)clusterId - attributeId:(NSNumber * _Nullable)attributeId - clientQueue:(dispatch_queue_t)clientQueue - completion:(void (^)(NSArray *> * _Nullable values, - NSError * _Nullable error))completion + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId + clientQueue:(dispatch_queue_t)clientQueue + completion:(void (^)(NSArray *> * _Nullable values, + NSError * _Nullable error))completion { __auto_type completionHandler = ^(NSArray *> * _Nullable values, NSError * _Nullable error) { - dispatch_async(clientQueue, ^{ + dispatch_async(clientQueue, ^ { completion(values, error); }); }; @@ -101,27 +101,27 @@ - (void)readAttributeWithEndpointId:(NSNumber * _Nullable)endpointId __auto_type controllerId = self.xpcControllerId; uint64_t nodeId = self.deviceId; [xpcConnection - getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull queue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { - if (handle) { - [handle.proxy readAttributeCacheWithController:controllerId - nodeId:nodeId - endpointId:endpointId - clusterId:clusterId - attributeId:attributeId - completion:^(id _Nullable values, NSError * _Nullable error) { - completion([MTRDeviceController decodeXPCResponseValues:values], error); - __auto_type handleRetainer = handle; - (void) handleRetainer; - }]; - } else { - MTR_LOG_ERROR("Attribute cache read failed due to XPC connection failure"); - completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); - } - }]; + getProxyHandleWithCompletion:^(dispatch_queue_t _Nonnull queue, MTRDeviceControllerXPCProxyHandle * _Nullable handle) { + if (handle) { + [handle.proxy readAttributeCacheWithController:controllerId + nodeId:nodeId + endpointId:endpointId + clusterId:clusterId + attributeId:attributeId + completion:^(id _Nullable values, NSError * _Nullable error) { + completion([MTRDeviceController decodeXPCResponseValues:values], error); + __auto_type handleRetainer = handle; + (void) handleRetainer; + }]; + } else { + MTR_LOG_ERROR("Attribute cache read failed due to XPC connection failure"); + completion(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeGeneralError userInfo:nil]); + } + }]; return; } - dispatch_async(DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_async(DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (endpointId == nil && clusterId == nil) { MTR_LOG_ERROR("Error: currently read from attribute cache does not support wildcards for both endpoint and cluster"); completionHandler(nil, [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeInvalidArgument userInfo:nil]); @@ -138,32 +138,32 @@ - (void)readAttributeWithEndpointId:(NSNumber * _Nullable)endpointId CHIP_ERROR err = CHIP_NO_ERROR; if (endpointId == nil) { err = self.cppAttributeCache->ForEachAttribute( - static_cast([clusterId unsignedLongValue]), [&](const app::ConcreteAttributePath & path) { - if (attributeId == nil + static_cast([clusterId unsignedLongValue]), [&](const app::ConcreteAttributePath & path) { + if (attributeId == nil || static_cast([attributeId unsignedLongValue]) == path.mAttributeId) { - (void) AppendAttibuteValueToArray(path, self.cppAttributeCache, result); - } - return CHIP_NO_ERROR; - }); + (void) AppendAttibuteValueToArray(path, self.cppAttributeCache, result); + } + return CHIP_NO_ERROR; + }); } else if (clusterId == nil) { err = self.cppAttributeCache->ForEachCluster( - static_cast([endpointId unsignedShortValue]), [&](chip::ClusterId enumeratedClusterId) { - (void) self.cppAttributeCache->ForEachAttribute(static_cast([endpointId unsignedShortValue]), - enumeratedClusterId, [&](const app::ConcreteAttributePath & path) { - if (attributeId == nil - || static_cast([attributeId unsignedLongValue]) == path.mAttributeId) { - (void) AppendAttibuteValueToArray(path, self.cppAttributeCache, result); - } - return CHIP_NO_ERROR; - }); + static_cast([endpointId unsignedShortValue]), [&](chip::ClusterId enumeratedClusterId) { + (void) self.cppAttributeCache->ForEachAttribute(static_cast([endpointId unsignedShortValue]), + enumeratedClusterId, [&](const app::ConcreteAttributePath & path) { + if (attributeId == nil + || static_cast([attributeId unsignedLongValue]) == path.mAttributeId) { + (void) AppendAttibuteValueToArray(path, self.cppAttributeCache, result); + } return CHIP_NO_ERROR; }); + return CHIP_NO_ERROR; + }); } else if (attributeId == nil) { err = self.cppAttributeCache->ForEachAttribute(static_cast([endpointId unsignedShortValue]), - static_cast([clusterId unsignedLongValue]), [&](const app::ConcreteAttributePath & path) { - (void) AppendAttibuteValueToArray(path, self.cppAttributeCache, result); - return CHIP_NO_ERROR; - }); + static_cast([clusterId unsignedLongValue]), [&](const app::ConcreteAttributePath & path) { + (void) AppendAttibuteValueToArray(path, self.cppAttributeCache, result); + return CHIP_NO_ERROR; + }); } else { app::ConcreteAttributePath path; path.mEndpointId = static_cast([endpointId unsignedShortValue]); diff --git a/src/darwin/Framework/CHIP/MTRCertificates.mm b/src/darwin/Framework/CHIP/MTRCertificates.mm index 80f3d9e10333bb..ee91cdd46777d4 100644 --- a/src/darwin/Framework/CHIP/MTRCertificates.mm +++ b/src/darwin/Framework/CHIP/MTRCertificates.mm @@ -31,9 +31,9 @@ @implementation MTRCertificates + (nullable NSData *)generateRootCertificate:(id)keypair - issuerId:(nullable NSNumber *)issuerId - fabricId:(nullable NSNumber *)fabricId - error:(NSError * __autoreleasing *)error + issuerId:(nullable NSNumber *)issuerId + fabricId:(nullable NSNumber *)fabricId + error:(NSError * __autoreleasing *)error { NSLog(@"Generating root certificate"); @@ -53,11 +53,11 @@ + (nullable NSData *)generateRootCertificate:(id)keypair } + (nullable NSData *)generateIntermediateCertificate:(id)rootKeypair - rootCertificate:(NSData *)rootCertificate - intermediatePublicKey:(SecKeyRef)intermediatePublicKey - issuerId:(nullable NSNumber *)issuerId - fabricId:(nullable NSNumber *)fabricId - error:(NSError * __autoreleasing *)error + rootCertificate:(NSData *)rootCertificate + intermediatePublicKey:(SecKeyRef)intermediatePublicKey + issuerId:(nullable NSNumber *)issuerId + fabricId:(nullable NSNumber *)fabricId + error:(NSError * __autoreleasing *)error { NSLog(@"Generating intermediate certificate"); @@ -65,7 +65,7 @@ + (nullable NSData *)generateIntermediateCertificate:(id)rootKeypair NSData * intermediate = nil; CHIP_ERROR err = MTROperationalCredentialsDelegate::GenerateIntermediateCertificate( - rootKeypair, rootCertificate, intermediatePublicKey, issuerId, fabricId, &intermediate); + rootKeypair, rootCertificate, intermediatePublicKey, issuerId, fabricId, &intermediate); if (error) { *error = [MTRError errorForCHIPErrorCode:err]; } @@ -78,12 +78,12 @@ + (nullable NSData *)generateIntermediateCertificate:(id)rootKeypair } + (nullable NSData *)generateOperationalCertificate:(id)signingKeypair - signingCertificate:(NSData *)signingCertificate - operationalPublicKey:(SecKeyRef)operationalPublicKey - fabricId:(NSNumber *)fabricId - nodeId:(NSNumber *)nodeId - caseAuthenticatedTags:(NSArray * _Nullable)caseAuthenticatedTags - error:(NSError * __autoreleasing _Nullable * _Nullable)error + signingCertificate:(NSData *)signingCertificate + operationalPublicKey:(SecKeyRef)operationalPublicKey + fabricId:(NSNumber *)fabricId + nodeId:(NSNumber *)nodeId + caseAuthenticatedTags:(NSArray * _Nullable)caseAuthenticatedTags + error:(NSError * __autoreleasing _Nullable * _Nullable)error { NSLog(@"Generating operational certificate"); @@ -91,7 +91,7 @@ + (nullable NSData *)generateOperationalCertificate:(id)signingKeypa NSData * opcert = nil; CHIP_ERROR err = MTROperationalCredentialsDelegate::GenerateOperationalCertificate( - signingKeypair, signingCertificate, operationalPublicKey, fabricId, nodeId, caseAuthenticatedTags, &opcert); + signingKeypair, signingCertificate, operationalPublicKey, fabricId, nodeId, caseAuthenticatedTags, &opcert); if (error) { *error = [MTRError errorForCHIPErrorCode:err]; } @@ -168,7 +168,7 @@ + (BOOL)isCertificate:(NSData *)certificate1 equalTo:(NSData *)certificate2 } + (nullable NSData *)generateCertificateSigningRequest:(id)keypair - error:(NSError * __autoreleasing _Nullable * _Nullable)error + error:(NSError * __autoreleasing _Nullable * _Nullable)error { [MTRMemory ensureInit]; diff --git a/src/darwin/Framework/CHIP/MTRCluster.mm b/src/darwin/Framework/CHIP/MTRCluster.mm index 384c509565420d..6e1f78686c01c2 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.mm +++ b/src/darwin/Framework/CHIP/MTRCluster.mm @@ -38,7 +38,7 @@ - (instancetype)initWithQueue:(dispatch_queue_t)queue - (chip::CharSpan)asCharSpan:(NSString *)value { return chip::CharSpan(static_cast([value dataUsingEncoding:NSUTF8StringEncoding].bytes), - [value lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); + [value lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); } @end diff --git a/src/darwin/Framework/CHIP/MTRControllerAccessControl.mm b/src/darwin/Framework/CHIP/MTRControllerAccessControl.mm index 8ea39e55fb2bec..d337316e3c442b 100644 --- a/src/darwin/Framework/CHIP/MTRControllerAccessControl.mm +++ b/src/darwin/Framework/CHIP/MTRControllerAccessControl.mm @@ -76,7 +76,7 @@ @implementation MTRControllerAccessControl + (void)init { static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ + dispatch_once(&onceToken, ^ { GetAccessControl().Init(&gDelegate, gDeviceTypeResolver); }); } diff --git a/src/darwin/Framework/CHIP/MTRControllerFactory.mm b/src/darwin/Framework/CHIP/MTRControllerFactory.mm index 676455d5916a74..6e6c81367bd812 100644 --- a/src/darwin/Framework/CHIP/MTRControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRControllerFactory.mm @@ -71,8 +71,8 @@ @interface MTRControllerFactory () @property () chip::Credentials::DeviceAttestationVerifier * deviceAttestationVerifier; - (BOOL)findMatchingFabric:(FabricTable &)fabricTable - params:(MTRDeviceControllerStartupParams *)params - fabric:(const FabricInfo * _Nullable * _Nonnull)fabric; + params:(MTRDeviceControllerStartupParams *)params + fabric:(const FabricInfo * _Nullable * _Nonnull)fabric; @end @implementation MTRControllerFactory @@ -81,7 +81,7 @@ + (instancetype)sharedInstance { static MTRControllerFactory * factory = nil; static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ + dispatch_once(&onceToken, ^ { // initialize the factory. factory = [[MTRControllerFactory alloc] init]; }); @@ -198,7 +198,7 @@ - (BOOL)startup:(MTRControllerFactoryParams *)startupParams DeviceLayer::PlatformMgrImpl().StartEventLoopTask(); - dispatch_sync(_chipWorkQueue, ^{ + dispatch_sync(_chipWorkQueue, ^ { if ([self isRunning]) { return; } @@ -328,7 +328,7 @@ - (MTRDeviceController * _Nullable)startControllerOnExistingFabric:(MTRDeviceCon // since we know our on-stack instance will outlive the block. FabricTable fabricTableInstance; FabricTable * fabricTable = &fabricTableInstance; - dispatch_sync(_chipWorkQueue, ^{ + dispatch_sync(_chipWorkQueue, ^ { const FabricInfo * fabric = nullptr; BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; if (!ok) { @@ -344,7 +344,7 @@ - (MTRDeviceController * _Nullable)startControllerOnExistingFabric:(MTRDeviceCon for (MTRDeviceController * existing in _controllers) { BOOL isRunning = YES; // assume the worst if ([existing isRunningOnFabric:fabricTable fabricIndex:fabric->GetFabricIndex() isRunning:&isRunning] - != CHIP_NO_ERROR) { + != CHIP_NO_ERROR) { MTR_LOG_ERROR("Can't tell what fabric a controller is running on. Not safe to start."); return; } @@ -356,9 +356,9 @@ - (MTRDeviceController * _Nullable)startControllerOnExistingFabric:(MTRDeviceCon } params = [[MTRDeviceControllerStartupParamsInternal alloc] initForExistingFabric:fabricTable - fabricIndex:fabric->GetFabricIndex() - keystore:_keystore - params:startupParams]; + fabricIndex:fabric->GetFabricIndex() + keystore:_keystore + params:startupParams]; }); if (params == nil) { @@ -403,7 +403,7 @@ - (MTRDeviceController * _Nullable)startControllerOnNewFabric:(MTRDeviceControll // since we know our on-stack instance will outlive the block. FabricTable fabricTableInstance; FabricTable * fabricTable = &fabricTableInstance; - dispatch_sync(_chipWorkQueue, ^{ + dispatch_sync(_chipWorkQueue, ^ { const FabricInfo * fabric = nullptr; BOOL ok = [self findMatchingFabric:*fabricTable params:startupParams fabric:&fabric]; if (!ok) { @@ -417,8 +417,8 @@ - (MTRDeviceController * _Nullable)startControllerOnNewFabric:(MTRDeviceControll } params = [[MTRDeviceControllerStartupParamsInternal alloc] initForNewFabric:fabricTable - keystore:_keystore - params:startupParams]; + keystore:_keystore + params:startupParams]; }); if (params == nil) { @@ -464,11 +464,11 @@ - (MTRDeviceController * _Nullable)createController // outlive the consumer's use of the FabricInfo we return, which is // why it's provided by the caller. - (BOOL)findMatchingFabric:(FabricTable &)fabricTable - params:(MTRDeviceControllerStartupParams *)params - fabric:(const FabricInfo * _Nullable * _Nonnull)fabric + params:(MTRDeviceControllerStartupParams *)params + fabric:(const FabricInfo * _Nullable * _Nonnull)fabric { CHIP_ERROR err = fabricTable.Init( - { .storage = _persistentStorageDelegateBridge, .operationalKeystore = _keystore, .opCertStore = _opCertStore }); + { .storage = _persistentStorageDelegateBridge, .operationalKeystore = _keystore, .opCertStore = _opCertStore }); if (err != CHIP_NO_ERROR) { MTR_LOG_ERROR("Can't initialize fabric table: %s", ErrorStr(err)); return NO; @@ -507,7 +507,7 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller } if (_groupDataProvider != nullptr) { - dispatch_sync(_chipWorkQueue, ^{ + dispatch_sync(_chipWorkQueue, ^ { FabricIndex idx = [controller fabricIndex]; if (idx != kUndefinedFabricIndex) { // Clear out out group keys for this fabric index, just in case fabric @@ -529,7 +529,7 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller [controller shutDownCppController]; } else { // Do the controller shutdown on the Matter work queue. - dispatch_sync(_chipWorkQueue, ^{ + dispatch_sync(_chipWorkQueue, ^ { [controller shutDownCppController]; }); } diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 9cc39ad8aa581a..00705abb32cf24 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -79,11 +79,11 @@ - (instancetype)initWithPath:(const ConcreteDataAttributePath &)path value:(null @interface MTREventReport () - (instancetype)initWithPath:(const ConcreteEventPath &)path - eventNumber:(NSNumber *)eventNumber - priority:(NSNumber *)priority - timestamp:(NSNumber *)timestamp - value:(nullable id)value - error:(nullable NSError *)error; + eventNumber:(NSNumber *)eventNumber + priority:(NSNumber *)priority + timestamp:(NSNumber *)timestamp + value:(nullable id)value + error:(nullable NSError *)error; @end @interface MTRReadClientContainer : NSObject @@ -99,7 +99,7 @@ - (void)onDone; static void InitializeReadClientContainers() { static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ + dispatch_once(&onceToken, ^ { readClientContainers = [NSMutableDictionary dictionary]; readClientContainersLock = [[NSLock alloc] init]; }); @@ -130,7 +130,7 @@ static void PurgeReadClientContainers(uint64_t deviceId, dispatch_queue_t queue, [readClientContainersLock unlock]; // Destroy read clients in the work queue - dispatch_async(DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_async(DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { for (MTRReadClientContainer * container in listToDelete) { if (container.readClientPtr) { Platform::Delete(container.readClientPtr); @@ -179,7 +179,7 @@ static void CauseReadClientFailure(uint64_t deviceId, dispatch_queue_t queue, vo [readClientContainers removeObjectForKey:key]; [readClientContainersLock unlock]; - dispatch_async(DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_async(DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { for (MTRReadClientContainer * container in listToFail) { // Send auto resubscribe request again by read clients, which must fail. chip::app::ReadPrepareParams readParams; @@ -246,7 +246,7 @@ - (instancetype)initWithDevice:(chip::DeviceProxy *)device - (void)invalidateCASESession { - dispatch_sync(DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { DeviceProxy * device = [self internalDevice]; if (device != nullptr) { device->Disconnect(); @@ -263,7 +263,7 @@ - (void)invalidateCASESession class SubscriptionCallback final : public ClusterStateCache::Callback { public: SubscriptionCallback(dispatch_queue_t queue, DataReportCallback attributeReportCallback, DataReportCallback eventReportCallback, - ErrorCallback errorCallback, SubscriptionEstablishedHandler _Nullable subscriptionEstablishedHandler) + ErrorCallback errorCallback, SubscriptionEstablishedHandler _Nullable subscriptionEstablishedHandler) : mQueue(queue) , mAttributeReportCallback(attributeReportCallback) , mEventReportCallback(eventReportCallback) @@ -274,8 +274,8 @@ - (void)invalidateCASESession } SubscriptionCallback(dispatch_queue_t queue, DataReportCallback attributeReportCallback, DataReportCallback eventReportCallback, - ErrorCallback errorCallback, SubscriptionEstablishedHandler _Nullable subscriptionEstablishedHandler, - void (^onDoneHandler)(void)) + ErrorCallback errorCallback, SubscriptionEstablishedHandler _Nullable subscriptionEstablishedHandler, + void (^onDoneHandler)(void)) : mQueue(queue) , mAttributeReportCallback(attributeReportCallback) , mEventReportCallback(eventReportCallback) @@ -286,11 +286,17 @@ - (void)invalidateCASESession { } - BufferedReadCallback & GetBufferedCallback() { return mBufferedReadAdapter; } + BufferedReadCallback & GetBufferedCallback() { + return mBufferedReadAdapter; + } // We need to exist to get a ReadClient, so can't take this as a constructor argument. - void AdoptReadClient(std::unique_ptr aReadClient) { mReadClient = std::move(aReadClient); } - void AdoptAttributeCache(std::unique_ptr aAttributeCache) { mAttributeCache = std::move(aAttributeCache); } + void AdoptReadClient(std::unique_ptr aReadClient) { + mReadClient = std::move(aReadClient); + } + void AdoptAttributeCache(std::unique_ptr aAttributeCache) { + mAttributeCache = std::move(aAttributeCache); + } private: void OnReportBegin() override; @@ -347,19 +353,19 @@ - (void)invalidateCASESession } // anonymous namespace - (void)subscribeWithQueue:(dispatch_queue_t)queue - minInterval:(uint16_t)minInterval - maxInterval:(uint16_t)maxInterval - params:(nullable MTRSubscribeParams *)params - cacheContainer:(MTRAttributeCacheContainer * _Nullable)attributeCacheContainer - attributeReportHandler:(nullable void (^)(NSArray * value))attributeReportHandler - eventReportHandler:(nullable void (^)(NSArray * value))eventReportHandler - errorHandler:(void (^)(NSError * error))errorHandler + minInterval:(uint16_t)minInterval + maxInterval:(uint16_t)maxInterval + params:(nullable MTRSubscribeParams *)params + cacheContainer:(MTRAttributeCacheContainer * _Nullable)attributeCacheContainer + attributeReportHandler:(nullable void (^)(NSArray * value))attributeReportHandler + eventReportHandler:(nullable void (^)(NSArray * value))eventReportHandler + errorHandler:(void (^)(NSError * error))errorHandler subscriptionEstablished:(nullable void (^)(void))subscriptionEstablishedHandler { - dispatch_async(DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_async(DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { DeviceProxy * device = [self internalDevice]; if (!device) { - dispatch_async(queue, ^{ + dispatch_async(queue, ^ { errorHandler([MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]); }); return; @@ -384,20 +390,20 @@ - (void)subscribeWithQueue:(dispatch_queue_t)queue if (attributeCacheContainer) { __weak MTRAttributeCacheContainer * weakPtr = attributeCacheContainer; callback = std::make_unique( - queue, attributeReportHandler, eventReportHandler, errorHandler, subscriptionEstablishedHandler, ^{ - MTRAttributeCacheContainer * container = weakPtr; - if (container) { - container.cppAttributeCache = nullptr; - } - }); + queue, attributeReportHandler, eventReportHandler, errorHandler, subscriptionEstablishedHandler, ^ { + MTRAttributeCacheContainer * container = weakPtr; + if (container) { + container.cppAttributeCache = nullptr; + } + }); attributeCache = std::make_unique(*callback.get()); readClient = std::make_unique(InteractionModelEngine::GetInstance(), device->GetExchangeManager(), - attributeCache->GetBufferedCallback(), ReadClient::InteractionType::Subscribe); + attributeCache->GetBufferedCallback(), ReadClient::InteractionType::Subscribe); } else { callback = std::make_unique( - queue, attributeReportHandler, eventReportHandler, errorHandler, subscriptionEstablishedHandler); + queue, attributeReportHandler, eventReportHandler, errorHandler, subscriptionEstablishedHandler); readClient = std::make_unique(InteractionModelEngine::GetInstance(), device->GetExchangeManager(), - callback->GetBufferedCallback(), ReadClient::InteractionType::Subscribe); + callback->GetBufferedCallback(), ReadClient::InteractionType::Subscribe); } CHIP_ERROR err; @@ -411,7 +417,7 @@ - (void)subscribeWithQueue:(dispatch_queue_t)queue } if (err != CHIP_NO_ERROR) { - dispatch_async(queue, ^{ + dispatch_async(queue, ^ { errorHandler([MTRError errorForCHIPErrorCode:err]); }); @@ -463,7 +469,7 @@ id _Nullable NSObjectFromCHIPTLV(chip::TLV::TLVReader * data) return nil; } return [NSDictionary - dictionaryWithObjectsAndKeys:MTRBooleanValueType, MTRTypeKey, [NSNumber numberWithBool:val], MTRValueKey, nil]; + dictionaryWithObjectsAndKeys:MTRBooleanValueType, MTRTypeKey, [NSNumber numberWithBool:val], MTRValueKey, nil]; } case chip::TLV::kTLVType_FloatingPointNumber: { // Try float first @@ -479,7 +485,7 @@ id _Nullable NSObjectFromCHIPTLV(chip::TLV::TLVReader * data) return nil; } return [NSDictionary - dictionaryWithObjectsAndKeys:MTRDoubleValueType, MTRTypeKey, [NSNumber numberWithDouble:val], MTRValueKey, nil]; + dictionaryWithObjectsAndKeys:MTRDoubleValueType, MTRTypeKey, [NSNumber numberWithDouble:val], MTRValueKey, nil]; } case chip::TLV::kTLVType_UTF8String: { uint32_t len = data->GetLength(); @@ -703,9 +709,13 @@ CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const static constexpr bool kIsFabricScoped = false; - static bool MustUseTimedInvoke() { return false; } + static bool MustUseTimedInvoke() { + return false; + } - id _Nullable GetDecodedObject() const { return decodedObj; } + id _Nullable GetDecodedObject() const { + return decodedObj; + } private: id _Nullable decodedObj; @@ -718,7 +728,9 @@ CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const dispatch_queue_t queue, MTRDeviceResponseHandler handler, MTRActionBlock action, bool keepAlive = false) : MTRCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive) {}; - static void OnSuccessFn(void * context, id value) { DispatchSuccess(context, value); } + static void OnSuccessFn(void * context, id value) { + DispatchSuccess(context, value); + } }; template class BufferedReadAttributeCallback final : public app::ReadClient::Callback { @@ -730,8 +742,8 @@ CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const using OnSubscriptionEstablishedCallbackType = std::function; BufferedReadAttributeCallback(ClusterId aClusterId, AttributeId aAttributeId, OnSuccessCallbackType aOnSuccess, - OnErrorCallbackType aOnError, OnDoneCallbackType aOnDone, - OnSubscriptionEstablishedCallbackType aOnSubscriptionEstablished = nullptr) + OnErrorCallbackType aOnError, OnDoneCallbackType aOnDone, + OnSubscriptionEstablishedCallbackType aOnSubscriptionEstablished = nullptr) : mClusterId(aClusterId) , mAttributeId(aAttributeId) , mOnSuccess(aOnSuccess) @@ -742,9 +754,13 @@ CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const { } - app::BufferedReadCallback & GetBufferedCallback() { return mBufferedReadAdapter; } + app::BufferedReadCallback & GetBufferedCallback() { + return mBufferedReadAdapter; + } - void AdoptReadClient(Platform::UniquePtr aReadClient) { mReadClient = std::move(aReadClient); } + void AdoptReadClient(Platform::UniquePtr aReadClient) { + mReadClient = std::move(aReadClient); + } private: void OnAttributeData( @@ -761,23 +777,27 @@ void OnAttributeData( VerifyOrExit(aStatus.IsSuccess(), err = aStatus.ToChipError()); VerifyOrExit((aPath.mClusterId == mClusterId || mClusterId == kInvalidClusterId) - && (aPath.mAttributeId == mAttributeId || mAttributeId == kInvalidAttributeId), - err = CHIP_ERROR_SCHEMA_MISMATCH); + && (aPath.mAttributeId == mAttributeId || mAttributeId == kInvalidAttributeId), + err = CHIP_ERROR_SCHEMA_MISMATCH); VerifyOrExit(apData != nullptr, err = CHIP_ERROR_INVALID_ARGUMENT); SuccessOrExit(err = app::DataModel::Decode(*apData, value)); mOnSuccess(aPath, value); - exit: +exit: if (err != CHIP_NO_ERROR) { mOnError(&aPath, err); } } - void OnError(CHIP_ERROR aError) override { mOnError(nullptr, aError); } + void OnError(CHIP_ERROR aError) override { + mOnError(nullptr, aError); + } - void OnDone(ReadClient *) override { mOnDone(this); } + void OnDone(ReadClient *) override { + mOnDone(this); + } void OnSubscriptionEstablished(SubscriptionId aSubscriptionId) override { @@ -799,174 +819,174 @@ void OnDeallocatePaths(chip::app::ReadPrepareParams && aReadPrepareParams) overr }; - (void)readAttributeWithEndpointId:(NSNumber *)endpointId - clusterId:(NSNumber *)clusterId - attributeId:(NSNumber *)attributeId - params:(MTRReadParams * _Nullable)params - clientQueue:(dispatch_queue_t)clientQueue - completion:(MTRDeviceResponseHandler)completion + clusterId:(NSNumber *)clusterId + attributeId:(NSNumber *)attributeId + params:(MTRReadParams * _Nullable)params + clientQueue:(dispatch_queue_t)clientQueue + completion:(MTRDeviceResponseHandler)completion { new NSObjectDataValueCallbackBridge( - clientQueue, completion, ^(chip::Callback::Cancelable * success, chip::Callback::Cancelable * failure) { - auto successFn = chip::Callback::Callback::FromCancelable(success); - auto failureFn = chip::Callback::Callback::FromCancelable(failure); - auto context = successFn->mContext; - auto successCb = successFn->mCall; - auto failureCb = failureFn->mCall; - auto resultArray = [[NSMutableArray alloc] init]; - auto resultSuccess = [[NSMutableArray alloc] init]; - auto resultFailure = [[NSMutableArray alloc] init]; - auto onSuccessCb - = [resultArray, resultSuccess](const app::ConcreteAttributePath & attribPath, const NSObjectData & aData) { - [resultArray addObject:@ { - MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:attribPath], - MTRDataKey : aData.GetDecodedObject() - }]; - if ([resultSuccess count] == 0) { - [resultSuccess addObject:[NSNumber numberWithBool:YES]]; - } - }; - - auto onFailureCb = [resultArray, resultFailure](const app::ConcreteAttributePath * attribPath, CHIP_ERROR aError) { - if (attribPath) { - [resultArray addObject:@ { - MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:*attribPath], - MTRErrorKey : [MTRError errorForCHIPErrorCode:aError] - }]; - } else if ([resultFailure count] == 0) { - [resultFailure addObject:[MTRError errorForCHIPErrorCode:aError]]; - } - }; - - app::AttributePathParams attributePath; - if (endpointId) { - attributePath.mEndpointId = static_cast([endpointId unsignedShortValue]); + clientQueue, completion, ^(chip::Callback::Cancelable * success, chip::Callback::Cancelable * failure) { + auto successFn = chip::Callback::Callback::FromCancelable(success); + auto failureFn = chip::Callback::Callback::FromCancelable(failure); + auto context = successFn->mContext; + auto successCb = successFn->mCall; + auto failureCb = failureFn->mCall; + auto resultArray = [[NSMutableArray alloc] init]; + auto resultSuccess = [[NSMutableArray alloc] init]; + auto resultFailure = [[NSMutableArray alloc] init]; + auto onSuccessCb + = [resultArray, resultSuccess](const app::ConcreteAttributePath & attribPath, const NSObjectData & aData) { + [resultArray addObject:@ { + MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:attribPath], + MTRDataKey : aData.GetDecodedObject() + }]; + if ([resultSuccess count] == 0) { + [resultSuccess addObject:[NSNumber numberWithBool:YES]]; } - if (clusterId) { - attributePath.mClusterId = static_cast([clusterId unsignedLongValue]); - } - if (attributeId) { - attributePath.mAttributeId = static_cast([attributeId unsignedLongValue]); + }; + + auto onFailureCb = [resultArray, resultFailure](const app::ConcreteAttributePath * attribPath, CHIP_ERROR aError) { + if (attribPath) { + [resultArray addObject:@ { + MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:*attribPath], + MTRErrorKey : [MTRError errorForCHIPErrorCode:aError] + }]; + } else if ([resultFailure count] == 0) { + [resultFailure addObject:[MTRError errorForCHIPErrorCode:aError]]; } - app::InteractionModelEngine * engine = app::InteractionModelEngine::GetInstance(); - CHIP_ERROR err = CHIP_NO_ERROR; - - chip::app::ReadPrepareParams readParams([self internalDevice]->GetSecureSession().Value()); - readParams.mpAttributePathParamsList = &attributePath; - readParams.mAttributePathParamsListSize = 1; - readParams.mIsFabricFiltered = params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]; - - auto onDone = [resultArray, resultSuccess, resultFailure, context, successCb, failureCb]( - BufferedReadAttributeCallback * callback) { - if ([resultFailure count] > 0 || [resultSuccess count] == 0) { - // Failure - if (failureCb) { - if ([resultFailure count] > 0) { - failureCb(context, [MTRError errorToCHIPErrorCode:resultFailure[0]]); - } else if ([resultArray count] > 0) { - failureCb(context, [MTRError errorToCHIPErrorCode:resultArray[0][MTRErrorKey]]); - } else { - failureCb(context, CHIP_ERROR_READ_FAILED); - } - } - } else { - // Success - if (successCb) { - successCb(context, resultArray); + }; + + app::AttributePathParams attributePath; + if (endpointId) { + attributePath.mEndpointId = static_cast([endpointId unsignedShortValue]); + } + if (clusterId) { + attributePath.mClusterId = static_cast([clusterId unsignedLongValue]); + } + if (attributeId) { + attributePath.mAttributeId = static_cast([attributeId unsignedLongValue]); + } + app::InteractionModelEngine * engine = app::InteractionModelEngine::GetInstance(); + CHIP_ERROR err = CHIP_NO_ERROR; + + chip::app::ReadPrepareParams readParams([self internalDevice]->GetSecureSession().Value()); + readParams.mpAttributePathParamsList = &attributePath; + readParams.mAttributePathParamsListSize = 1; + readParams.mIsFabricFiltered = params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]; + + auto onDone = [resultArray, resultSuccess, resultFailure, context, successCb, failureCb]( + BufferedReadAttributeCallback * callback) { + if ([resultFailure count] > 0 || [resultSuccess count] == 0) { + // Failure + if (failureCb) { + if ([resultFailure count] > 0) { + failureCb(context, [MTRError errorToCHIPErrorCode:resultFailure[0]]); + } else if ([resultArray count] > 0) { + failureCb(context, [MTRError errorToCHIPErrorCode:resultArray[0][MTRErrorKey]]); + } else { + failureCb(context, CHIP_ERROR_READ_FAILED); } } - chip::Platform::Delete(callback); - }; + } else { + // Success + if (successCb) { + successCb(context, resultArray); + } + } + chip::Platform::Delete(callback); + }; - auto callback = chip::Platform::MakeUnique>( - attributePath.mClusterId, attributePath.mAttributeId, onSuccessCb, onFailureCb, onDone, nullptr); - VerifyOrReturnError(callback != nullptr, CHIP_ERROR_NO_MEMORY); + auto callback = chip::Platform::MakeUnique>( + attributePath.mClusterId, attributePath.mAttributeId, onSuccessCb, onFailureCb, onDone, nullptr); + VerifyOrReturnError(callback != nullptr, CHIP_ERROR_NO_MEMORY); - auto readClient = chip::Platform::MakeUnique(engine, [self internalDevice]->GetExchangeManager(), - callback -> GetBufferedCallback(), chip::app::ReadClient::InteractionType::Read); - VerifyOrReturnError(readClient != nullptr, CHIP_ERROR_NO_MEMORY); + auto readClient = chip::Platform::MakeUnique(engine, [self internalDevice]->GetExchangeManager(), + callback -> GetBufferedCallback(), chip::app::ReadClient::InteractionType::Read); + VerifyOrReturnError(readClient != nullptr, CHIP_ERROR_NO_MEMORY); - err = readClient->SendRequest(readParams); + err = readClient->SendRequest(readParams); - if (err != CHIP_NO_ERROR) { - return err; - } - - // - // At this point, we'll get a callback through the OnDone callback above regardless of success or failure - // of the read operation to permit us to free up the callback object. So, release ownership of the callback - // object now to prevent it from being reclaimed at the end of this scoped block. - // - callback->AdoptReadClient(std::move(readClient)); - callback.release(); + if (err != CHIP_NO_ERROR) { return err; - }); + } + + // + // At this point, we'll get a callback through the OnDone callback above regardless of success or failure + // of the read operation to permit us to free up the callback object. So, release ownership of the callback + // object now to prevent it from being reclaimed at the end of this scoped block. + // + callback->AdoptReadClient(std::move(readClient)); + callback.release(); + return err; + }); } - (void)writeAttributeWithEndpointId:(NSNumber *)endpointId - clusterId:(NSNumber *)clusterId - attributeId:(NSNumber *)attributeId - value:(id)value - timedWriteTimeout:(NSNumber * _Nullable)timeoutMs - clientQueue:(dispatch_queue_t)clientQueue - completion:(MTRDeviceResponseHandler)completion + clusterId:(NSNumber *)clusterId + attributeId:(NSNumber *)attributeId + value:(id)value + timedWriteTimeout:(NSNumber * _Nullable)timeoutMs + clientQueue:(dispatch_queue_t)clientQueue + completion:(MTRDeviceResponseHandler)completion { new NSObjectDataValueCallbackBridge( - clientQueue, completion, ^(chip::Callback::Cancelable * success, chip::Callback::Cancelable * failure) { - auto successFn = chip::Callback::Callback::FromCancelable(success); - auto failureFn = chip::Callback::Callback::FromCancelable(failure); - auto context = successFn->mContext; - auto successCb = successFn->mCall; - auto failureCb = failureFn->mCall; - auto resultArray = [[NSMutableArray alloc] init]; - auto resultSuccess = [[NSMutableArray alloc] init]; - auto resultFailure = [[NSMutableArray alloc] init]; - auto onSuccessCb = [resultArray, resultSuccess](const app::ConcreteAttributePath & attribPath) { - [resultArray addObject:@ { MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:attribPath] }]; - if ([resultSuccess count] == 0) { - [resultSuccess addObject:[NSNumber numberWithBool:YES]]; + clientQueue, completion, ^(chip::Callback::Cancelable * success, chip::Callback::Cancelable * failure) { + auto successFn = chip::Callback::Callback::FromCancelable(success); + auto failureFn = chip::Callback::Callback::FromCancelable(failure); + auto context = successFn->mContext; + auto successCb = successFn->mCall; + auto failureCb = failureFn->mCall; + auto resultArray = [[NSMutableArray alloc] init]; + auto resultSuccess = [[NSMutableArray alloc] init]; + auto resultFailure = [[NSMutableArray alloc] init]; + auto onSuccessCb = [resultArray, resultSuccess](const app::ConcreteAttributePath & attribPath) { + [resultArray addObject:@ { MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:attribPath] }]; + if ([resultSuccess count] == 0) { + [resultSuccess addObject:[NSNumber numberWithBool:YES]]; + } + }; + + auto onFailureCb = [resultArray, resultFailure](const app::ConcreteAttributePath * attribPath, CHIP_ERROR aError) { + if (attribPath) { + [resultArray addObject:@ { + MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:*attribPath], + MTRErrorKey : [MTRError errorForCHIPErrorCode:aError], + }]; + } else { + if ([resultFailure count] == 0) { + [resultFailure addObject:[MTRError errorForCHIPErrorCode:aError]]; } - }; - - auto onFailureCb = [resultArray, resultFailure](const app::ConcreteAttributePath * attribPath, CHIP_ERROR aError) { - if (attribPath) { - [resultArray addObject:@ { - MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:*attribPath], - MTRErrorKey : [MTRError errorForCHIPErrorCode:aError], - }]; - } else { - if ([resultFailure count] == 0) { - [resultFailure addObject:[MTRError errorForCHIPErrorCode:aError]]; + } + }; + + auto onDoneCb + = [context, successCb, failureCb, resultArray, resultSuccess, resultFailure](app::WriteClient * pWriteClient) { + if ([resultFailure count] > 0 || [resultSuccess count] == 0) { + // Failure + if (failureCb) { + if ([resultFailure count] > 0) { + failureCb(context, [MTRError errorToCHIPErrorCode:resultFailure[0]]); + } else if ([resultArray count] > 0) { + failureCb(context, [MTRError errorToCHIPErrorCode:resultArray[0][MTRErrorKey]]); + } else { + failureCb(context, CHIP_ERROR_WRITE_FAILED); } } - }; - - auto onDoneCb - = [context, successCb, failureCb, resultArray, resultSuccess, resultFailure](app::WriteClient * pWriteClient) { - if ([resultFailure count] > 0 || [resultSuccess count] == 0) { - // Failure - if (failureCb) { - if ([resultFailure count] > 0) { - failureCb(context, [MTRError errorToCHIPErrorCode:resultFailure[0]]); - } else if ([resultArray count] > 0) { - failureCb(context, [MTRError errorToCHIPErrorCode:resultArray[0][MTRErrorKey]]); - } else { - failureCb(context, CHIP_ERROR_WRITE_FAILED); - } - } - } else { - // Success - if (successCb) { - successCb(context, resultArray); - } - } - }; - - return chip::Controller::WriteAttribute([self internalDevice]->GetSecureSession().Value(), + } else { + // Success + if (successCb) { + successCb(context, resultArray); + } + } + }; + + return chip::Controller::WriteAttribute([self internalDevice]->GetSecureSession().Value(), static_cast([endpointId unsignedShortValue]), static_cast([clusterId unsignedLongValue]), static_cast([attributeId unsignedLongValue]), NSObjectData(value), onSuccessCb, onFailureCb, (timeoutMs == nil) ? NullOptional : Optional([timeoutMs unsignedShortValue]), onDoneCb, NullOptional); - }); + }); } class NSObjectCommandCallback final : public app::CommandSender::Callback { @@ -984,7 +1004,7 @@ new NSObjectDataValueCallbackBridge( * into a hypothetical OnDoneCallback function. */ NSObjectCommandCallback(chip::ClusterId clusterId, chip::CommandId commandId, OnSuccessCallbackType aOnSuccess, - OnErrorCallbackType aOnError, OnDoneCallbackType aOnDone = {}) + OnErrorCallbackType aOnError, OnDoneCallbackType aOnDone = {}) : mOnSuccess(aOnSuccess) , mOnError(aOnError) , mOnDone(aOnDone) @@ -993,15 +1013,21 @@ new NSObjectDataValueCallbackBridge( { } - void SetOnDoneCallback(OnDoneCallbackType callback) { mOnDone = callback; } + void SetOnDoneCallback(OnDoneCallbackType callback) { + mOnDone = callback; + } private: void OnResponse(app::CommandSender * apCommandSender, const app::ConcreteCommandPath & aCommandPath, - const app::StatusIB & aStatus, TLV::TLVReader * aReader) override; + const app::StatusIB & aStatus, TLV::TLVReader * aReader) override; - void OnError(const app::CommandSender * apCommandSender, CHIP_ERROR aError) override { mOnError(aError); } + void OnError(const app::CommandSender * apCommandSender, CHIP_ERROR aError) override { + mOnError(aError); + } - void OnDone(app::CommandSender * apCommandSender) override { mOnDone(apCommandSender); } + void OnDone(app::CommandSender * apCommandSender) override { + mOnDone(apCommandSender); + } OnSuccessCallbackType mOnSuccess; OnErrorCallbackType mOnError; @@ -1011,7 +1037,7 @@ void OnResponse(app::CommandSender * apCommandSender, const app::ConcreteCommand }; void NSObjectCommandCallback::OnResponse(app::CommandSender * apCommandSender, const app::ConcreteCommandPath & aCommandPath, - const app::StatusIB & aStatus, TLV::TLVReader * aReader) + const app::StatusIB & aStatus, TLV::TLVReader * aReader) { NSObjectData response; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1035,114 +1061,115 @@ void OnResponse(app::CommandSender * apCommandSender, const app::ConcreteCommand } - (void)invokeCommandWithEndpointId:(NSNumber *)endpointId - clusterId:(NSNumber *)clusterId - commandId:(NSNumber *)commandId - commandFields:(id)commandFields - timedInvokeTimeout:(NSNumber * _Nullable)timeoutMs - clientQueue:(dispatch_queue_t)clientQueue - completion:(MTRDeviceResponseHandler)completion + clusterId:(NSNumber *)clusterId + commandId:(NSNumber *)commandId + commandFields:(id)commandFields + timedInvokeTimeout:(NSNumber * _Nullable)timeoutMs + clientQueue:(dispatch_queue_t)clientQueue + completion:(MTRDeviceResponseHandler)completion { new NSObjectDataValueCallbackBridge( - clientQueue, completion, ^(chip::Callback::Cancelable * success, chip::Callback::Cancelable * failure) { - auto successFn = chip::Callback::Callback::FromCancelable(success); - auto failureFn = chip::Callback::Callback::FromCancelable(failure); - auto context = successFn->mContext; - auto successCb = successFn->mCall; - auto failureCb = failureFn->mCall; - auto resultArray = [[NSMutableArray alloc] init]; - auto resultSuccess = [[NSMutableArray alloc] init]; - auto resultFailure = [[NSMutableArray alloc] init]; - auto onSuccessCb = [resultArray, resultSuccess](const app::ConcreteCommandPath & commandPath, - const app::StatusIB & status, const NSObjectData & responseData) { - if (responseData.GetDecodedObject()) { - [resultArray addObject:@ { - MTRCommandPathKey : [[MTRCommandPath alloc] initWithPath:commandPath], - MTRDataKey : responseData.GetDecodedObject() - }]; - } else { - [resultArray addObject:@ { MTRCommandPathKey : [[MTRCommandPath alloc] initWithPath:commandPath] }]; - } - if ([resultSuccess count] == 0) { - [resultSuccess addObject:[NSNumber numberWithBool:YES]]; - } - }; + clientQueue, completion, ^(chip::Callback::Cancelable * success, chip::Callback::Cancelable * failure) { + auto successFn = chip::Callback::Callback::FromCancelable(success); + auto failureFn = chip::Callback::Callback::FromCancelable(failure); + auto context = successFn->mContext; + auto successCb = successFn->mCall; + auto failureCb = failureFn->mCall; + auto resultArray = [[NSMutableArray alloc] init]; + auto resultSuccess = [[NSMutableArray alloc] init]; + auto resultFailure = [[NSMutableArray alloc] init]; + auto onSuccessCb = [resultArray, resultSuccess](const app::ConcreteCommandPath & commandPath, + const app::StatusIB & status, const NSObjectData & responseData) { + if (responseData.GetDecodedObject()) { + [resultArray addObject:@ { + MTRCommandPathKey : [[MTRCommandPath alloc] initWithPath:commandPath], + MTRDataKey : responseData.GetDecodedObject() + }]; + } else { + [resultArray addObject:@ { MTRCommandPathKey : [[MTRCommandPath alloc] initWithPath:commandPath] }]; + } + if ([resultSuccess count] == 0) { + [resultSuccess addObject:[NSNumber numberWithBool:YES]]; + } + }; - auto onFailureCb = [resultFailure](CHIP_ERROR aError) { - if ([resultFailure count] == 0) { - [resultFailure addObject:[MTRError errorForCHIPErrorCode:aError]]; - } - }; + auto onFailureCb = [resultFailure](CHIP_ERROR aError) { + if ([resultFailure count] == 0) { + [resultFailure addObject:[MTRError errorForCHIPErrorCode:aError]]; + } + }; - app::CommandPathParams commandPath = { static_cast([endpointId unsignedShortValue]), 0, - static_cast([clusterId unsignedLongValue]), - static_cast([commandId unsignedLongValue]), (app::CommandPathFlags::kEndpointIdValid) }; - - auto decoder = chip::Platform::MakeUnique( - commandPath.mClusterId, commandPath.mCommandId, onSuccessCb, onFailureCb); - VerifyOrReturnError(decoder != nullptr, CHIP_ERROR_NO_MEMORY); - - auto rawDecoderPtr = decoder.get(); - auto onDoneCb = [rawDecoderPtr, context, successCb, failureCb, resultArray, resultSuccess, resultFailure]( - app::CommandSender * commandSender) { - if ([resultFailure count] > 0 || [resultSuccess count] == 0) { - // Failure - if (failureCb) { - if ([resultFailure count] > 0) { - failureCb(context, [MTRError errorToCHIPErrorCode:resultFailure[0]]); - } else { - failureCb(context, CHIP_ERROR_WRITE_FAILED); - } - } - } else { - // Success - if (successCb) { - successCb(context, resultArray); + app::CommandPathParams commandPath = { static_cast([endpointId unsignedShortValue]), 0, + static_cast([clusterId unsignedLongValue]), + static_cast([commandId unsignedLongValue]), (app::CommandPathFlags::kEndpointIdValid) + }; + + auto decoder = chip::Platform::MakeUnique( + commandPath.mClusterId, commandPath.mCommandId, onSuccessCb, onFailureCb); + VerifyOrReturnError(decoder != nullptr, CHIP_ERROR_NO_MEMORY); + + auto rawDecoderPtr = decoder.get(); + auto onDoneCb = [rawDecoderPtr, context, successCb, failureCb, resultArray, resultSuccess, resultFailure]( + app::CommandSender * commandSender) { + if ([resultFailure count] > 0 || [resultSuccess count] == 0) { + // Failure + if (failureCb) { + if ([resultFailure count] > 0) { + failureCb(context, [MTRError errorToCHIPErrorCode:resultFailure[0]]); + } else { + failureCb(context, CHIP_ERROR_WRITE_FAILED); } } - chip::Platform::Delete(commandSender); - chip::Platform::Delete(rawDecoderPtr); - }; + } else { + // Success + if (successCb) { + successCb(context, resultArray); + } + } + chip::Platform::Delete(commandSender); + chip::Platform::Delete(rawDecoderPtr); + }; - decoder->SetOnDoneCallback(onDoneCb); + decoder->SetOnDoneCallback(onDoneCb); - auto commandSender - = chip::Platform::MakeUnique(decoder.get(), [self internalDevice]->GetExchangeManager(), false); - VerifyOrReturnError(commandSender != nullptr, CHIP_ERROR_NO_MEMORY); + auto commandSender + = chip::Platform::MakeUnique(decoder.get(), [self internalDevice]->GetExchangeManager(), false); + VerifyOrReturnError(commandSender != nullptr, CHIP_ERROR_NO_MEMORY); - ReturnErrorOnFailure(commandSender->AddRequestData(commandPath, NSObjectData(commandFields), - (timeoutMs == nil) ? NullOptional : Optional([timeoutMs unsignedShortValue]))); - ReturnErrorOnFailure(commandSender->SendCommandRequest([self internalDevice]->GetSecureSession().Value())); + ReturnErrorOnFailure(commandSender->AddRequestData(commandPath, NSObjectData(commandFields), + (timeoutMs == nil) ? NullOptional : Optional([timeoutMs unsignedShortValue]))); + ReturnErrorOnFailure(commandSender->SendCommandRequest([self internalDevice]->GetSecureSession().Value())); - decoder.release(); - commandSender.release(); - return CHIP_NO_ERROR; - }); + decoder.release(); + commandSender.release(); + return CHIP_NO_ERROR; + }); } - (void)subscribeAttributeWithEndpointId:(NSNumber * _Nullable)endpointId - clusterId:(NSNumber * _Nullable)clusterId - attributeId:(NSNumber * _Nullable)attributeId - minInterval:(NSNumber *)minInterval - maxInterval:(NSNumber *)maxInterval - params:(MTRSubscribeParams * _Nullable)params - clientQueue:(dispatch_queue_t)clientQueue - reportHandler:(MTRDeviceResponseHandler)reportHandler - subscriptionEstablished:(SubscriptionEstablishedHandler)subscriptionEstablishedHandler + clusterId:(NSNumber * _Nullable)clusterId + attributeId:(NSNumber * _Nullable)attributeId + minInterval:(NSNumber *)minInterval + maxInterval:(NSNumber *)maxInterval + params:(MTRSubscribeParams * _Nullable)params + clientQueue:(dispatch_queue_t)clientQueue + reportHandler:(MTRDeviceResponseHandler)reportHandler + subscriptionEstablished:(SubscriptionEstablishedHandler)subscriptionEstablishedHandler { - dispatch_async(DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_async(DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { auto onReportCb = [clientQueue, reportHandler](const app::ConcreteAttributePath & attribPath, const NSObjectData & data) { id valueObject = data.GetDecodedObject(); app::ConcreteAttributePath pathCopy = attribPath; - dispatch_async(clientQueue, ^{ + dispatch_async(clientQueue, ^ { reportHandler( - @[ @ { MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:pathCopy], MTRDataKey : valueObject } ], - nil); +@[ @ { MTRAttributePathKey : [[MTRAttributePath alloc] initWithPath:pathCopy], MTRDataKey : valueObject } ], + nil); }); }; auto establishedOrFailed = chip::Platform::MakeShared(NO); auto onFailureCb = [establishedOrFailed, clientQueue, subscriptionEstablishedHandler, reportHandler]( - const app::ConcreteAttributePath * attribPath, CHIP_ERROR error) { + const app::ConcreteAttributePath * attribPath, CHIP_ERROR error) { if (!(*establishedOrFailed)) { *establishedOrFailed = YES; if (subscriptionEstablishedHandler) { @@ -1150,7 +1177,7 @@ - (void)subscribeAttributeWithEndpointId:(NSNumber * _Nullable)endpointId } } if (reportHandler) { - dispatch_async(clientQueue, ^{ + dispatch_async(clientQueue, ^ { reportHandler(nil, [MTRError errorForCHIPErrorCode:error]); }); } @@ -1197,16 +1224,16 @@ - (void)subscribeAttributeWithEndpointId:(NSNumber * _Nullable)endpointId }; auto callback = chip::Platform::MakeUnique>( - container.pathParams->mClusterId, container.pathParams->mAttributeId, onReportCb, onFailureCb, onDone, onEstablishedCb); + container.pathParams->mClusterId, container.pathParams->mAttributeId, onReportCb, onFailureCb, onDone, onEstablishedCb); auto readClient = Platform::New(engine, [self internalDevice]->GetExchangeManager(), - callback -> GetBufferedCallback(), chip::app::ReadClient::InteractionType::Subscribe); + callback -> GetBufferedCallback(), chip::app::ReadClient::InteractionType::Subscribe); err = readClient->SendAutoResubscribeRequest(std::move(readParams)); if (err != CHIP_NO_ERROR) { if (reportHandler) { - dispatch_async(clientQueue, ^{ + dispatch_async(clientQueue, ^ { reportHandler(nil, [MTRError errorForCHIPErrorCode:err]); }); } @@ -1293,8 +1320,8 @@ - (instancetype)initWithPath:(const ConcreteDataAttributePath &)path + (instancetype)attributePathWithEndpointId:(NSNumber *)endpoint clusterId:(NSNumber *)clusterId attributeId:(NSNumber *)attributeId { ConcreteDataAttributePath path(static_cast([endpoint unsignedShortValue]), - static_cast([clusterId unsignedLongValue]), - static_cast([attributeId unsignedLongValue])); + static_cast([clusterId unsignedLongValue]), + static_cast([attributeId unsignedLongValue])); return [[MTRAttributePath alloc] initWithPath:path]; } @@ -1314,7 +1341,7 @@ - (instancetype)initWithPath:(const ConcreteEventPath &)path + (instancetype)eventPathWithEndpointId:(NSNumber *)endpoint clusterId:(NSNumber *)clusterId eventId:(NSNumber *)eventId { ConcreteEventPath path(static_cast([endpoint unsignedShortValue]), - static_cast([clusterId unsignedLongValue]), static_cast([eventId unsignedLongValue])); + static_cast([clusterId unsignedLongValue]), static_cast([eventId unsignedLongValue])); return [[MTREventPath alloc] initWithPath:path]; } @@ -1334,7 +1361,7 @@ - (instancetype)initWithPath:(const ConcreteCommandPath &)path + (instancetype)commandPathWithEndpointId:(NSNumber *)endpoint clusterId:(NSNumber *)clusterId commandId:(NSNumber *)commandId { ConcreteCommandPath path(static_cast([endpoint unsignedShortValue]), - static_cast([clusterId unsignedLongValue]), static_cast([commandId unsignedLongValue])); + static_cast([clusterId unsignedLongValue]), static_cast([commandId unsignedLongValue])); return [[MTRCommandPath alloc] initWithPath:path]; } @@ -1354,11 +1381,11 @@ - (instancetype)initWithPath:(const ConcreteDataAttributePath &)path value:(null @implementation MTREventReport - (instancetype)initWithPath:(const ConcreteEventPath &)path - eventNumber:(NSNumber *)eventNumber - priority:(NSNumber *)priority - timestamp:(NSNumber *)timestamp - value:(nullable id)value - error:(nullable NSError *)error + eventNumber:(NSNumber *)eventNumber + priority:(NSNumber *)priority + timestamp:(NSNumber *)timestamp + value:(nullable id)value + error:(nullable NSError *)error { if (self = [super init]) { _path = [[MTREventPath alloc] initWithPath:path]; @@ -1387,18 +1414,20 @@ - (instancetype)initWithPath:(const ConcreteEventPath &)path __block NSArray * eventReports = mEventReports; mEventReports = nil; if (mAttributeReportCallback && attributeReports.count) { - dispatch_async(mQueue, ^{ + dispatch_async(mQueue, ^ { mAttributeReportCallback(attributeReports); }); } if (mEventReportCallback && eventReports.count) { - dispatch_async(mQueue, ^{ + dispatch_async(mQueue, ^ { mEventReportCallback(eventReports); }); } } -void SubscriptionCallback::OnReportEnd() { ReportData(); } +void SubscriptionCallback::OnReportEnd() { + ReportData(); +} void SubscriptionCallback::OnEventData(const EventHeader & aEventHeader, TLV::TLVReader * apData, const StatusIB * apStatus) { @@ -1429,11 +1458,11 @@ - (instancetype)initWithPath:(const ConcreteEventPath &)path } [mEventReports addObject:[[MTREventReport alloc] initWithPath:aEventHeader.mPath - eventNumber:@(aEventHeader.mEventNumber) - priority:@((uint8_t) aEventHeader.mPriorityLevel) - timestamp:@(aEventHeader.mTimestamp.mValue) - value:value - error:error]]; + eventNumber:@(aEventHeader.mEventNumber) + priority:@((uint8_t) aEventHeader.mPriorityLevel) + timestamp:@(aEventHeader.mTimestamp.mValue) + value:value + error:error]]; } void SubscriptionCallback::OnAttributeData( @@ -1495,19 +1524,19 @@ - (instancetype)initWithPath:(const ConcreteEventPath &)path void SubscriptionCallback::OnDeallocatePaths(ReadPrepareParams && aReadPrepareParams) { VerifyOrDie((aReadPrepareParams.mAttributePathParamsListSize == 0 && aReadPrepareParams.mpAttributePathParamsList == nullptr) - || (aReadPrepareParams.mAttributePathParamsListSize == 1 && aReadPrepareParams.mpAttributePathParamsList != nullptr)); + || (aReadPrepareParams.mAttributePathParamsListSize == 1 && aReadPrepareParams.mpAttributePathParamsList != nullptr)); if (aReadPrepareParams.mpAttributePathParamsList) { delete aReadPrepareParams.mpAttributePathParamsList; } VerifyOrDie((aReadPrepareParams.mDataVersionFilterListSize == 0 && aReadPrepareParams.mpDataVersionFilterList == nullptr) - || (aReadPrepareParams.mDataVersionFilterListSize == 1 && aReadPrepareParams.mpDataVersionFilterList != nullptr)); + || (aReadPrepareParams.mDataVersionFilterListSize == 1 && aReadPrepareParams.mpDataVersionFilterList != nullptr)); if (aReadPrepareParams.mpDataVersionFilterList != nullptr) { delete aReadPrepareParams.mpDataVersionFilterList; } VerifyOrDie((aReadPrepareParams.mEventPathParamsListSize == 0 && aReadPrepareParams.mpEventPathParamsList == nullptr) - || (aReadPrepareParams.mEventPathParamsListSize == 1 && aReadPrepareParams.mpEventPathParamsList != nullptr)); + || (aReadPrepareParams.mEventPathParamsListSize == 1 && aReadPrepareParams.mpEventPathParamsList != nullptr)); if (aReadPrepareParams.mpEventPathParamsList) { delete aReadPrepareParams.mpEventPathParamsList; } @@ -1520,9 +1549,13 @@ - (instancetype)initWithPath:(const ConcreteEventPath &)path } } -void SubscriptionCallback::ReportError(CHIP_ERROR err) { ReportError([MTRError errorForCHIPErrorCode:err]); } +void SubscriptionCallback::ReportError(CHIP_ERROR err) { + ReportError([MTRError errorForCHIPErrorCode:err]); +} -void SubscriptionCallback::ReportError(const StatusIB & status) { ReportError([MTRError errorForIMStatus:status]); } +void SubscriptionCallback::ReportError(const StatusIB & status) { + ReportError([MTRError errorForIMStatus:status]); +} void SubscriptionCallback::ReportError(NSError * _Nullable err) { @@ -1543,7 +1576,7 @@ - (instancetype)initWithPath:(const ConcreteEventPath &)path mEventReportCallback = nil; __auto_type onDoneHandler = mOnDoneHandler; mOnDoneHandler = nil; - dispatch_async(mQueue, ^{ + dispatch_async(mQueue, ^ { callback(err); if (onDoneHandler) { onDoneHandler(); diff --git a/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegateBridge.mm b/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegateBridge.mm index db8f277ca8a144..0a4abcd78d6ea0 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegateBridge.mm @@ -19,9 +19,9 @@ #import "MTRError_Internal.h" void MTRDeviceAttestationDelegateBridge::OnDeviceAttestationFailed(chip::Controller::DeviceCommissioner * deviceCommissioner, - chip::DeviceProxy * device, chip::Credentials::AttestationVerificationResult attestationResult) + chip::DeviceProxy * device, chip::Credentials::AttestationVerificationResult attestationResult) { - dispatch_async(mQueue, ^{ + dispatch_async(mQueue, ^ { NSLog(@"MTRDeviceAttestationDelegateBridge::OnDeviceAttestationFailed failed with result: %hu", attestationResult); mResult = attestationResult; diff --git a/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.mm b/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.mm index 6972ae7f788698..bb8a8324139f5e 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.mm @@ -23,7 +23,7 @@ { auto * object = static_cast(context); MTRDevice * chipDevice = [[MTRDevice alloc] initWithDevice:device]; - dispatch_async(object->mQueue, ^{ + dispatch_async(object->mQueue, ^ { object->mCompletionHandler(chipDevice, nil); object->Release(); }); @@ -32,7 +32,7 @@ void MTRDeviceConnectionBridge::OnConnectionFailure(void * context, chip::PeerId peerId, CHIP_ERROR error) { auto * object = static_cast(context); - dispatch_async(object->mQueue, ^{ + dispatch_async(object->mQueue, ^ { object->mCompletionHandler(nil, [MTRError errorForCHIPErrorCode:error]); object->Release(); }); diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 86e8b66aa0e771..53fb65c2439cb3 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -161,7 +161,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams return NO; } - dispatch_sync(_chipWorkQueue, ^{ + dispatch_sync(_chipWorkQueue, ^ { if ([self isRunning]) { return; } @@ -183,8 +183,8 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams } if (startupParams.operationalCertificate != nil && startupParams.operationalKeypair == nil - && (!startupParams.fabricIndex.HasValue() - || !startupParams.keystore->HasOpKeypairForFabric(startupParams.fabricIndex.Value()))) { + && (!startupParams.fabricIndex.HasValue() + || !startupParams.keystore->HasOpKeypairForFabric(startupParams.fabricIndex.Value()))) { MTR_LOG_ERROR("Have no operational keypair for our operational certificate"); return; } @@ -201,7 +201,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams signingKeypair = &_signingKeypairBridge; } errorCode = _operationalCredentialsDelegate->Init(_factory.storageDelegateBridge, signingKeypair, startupParams.ipk, - startupParams.rootCertificate, startupParams.intermediateCertificate); + startupParams.rootCertificate, startupParams.intermediateCertificate); if ([self checkForStartError:(CHIP_NO_ERROR == errorCode) logMsg:kErrorOperationalCredentialsInit]) { return; } @@ -241,7 +241,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams if (commissionerParams.operationalKeypair != nullptr) { errorCode = _operationalCredentialsDelegate->GenerateNOC([startupParams.nodeId unsignedLongLongValue], - startupParams.fabricId, chip::kUndefinedCATs, commissionerParams.operationalKeypair->Pubkey(), noc); + startupParams.fabricId, chip::kUndefinedCATs, commissionerParams.operationalKeypair->Pubkey(), noc); if ([self checkForStartError:(CHIP_NO_ERROR == errorCode) logMsg:kErrorGenerateNOC]) { return; @@ -262,7 +262,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams } errorCode = _operationalCredentialsDelegate->GenerateNOC( - [startupParams.nodeId unsignedLongLongValue], startupParams.fabricId, chip::kUndefinedCATs, pubKey, noc); + [startupParams.nodeId unsignedLongLongValue], startupParams.fabricId, chip::kUndefinedCATs, pubKey, noc); if ([self checkForStartError:(CHIP_NO_ERROR == errorCode) logMsg:kErrorGenerateNOC]) { return; @@ -290,7 +290,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams } errorCode = chip::Credentials::SetSingleIpkEpochKey( - _factory.groupData, fabricIdx, _operationalCredentialsDelegate->GetIPK(), compressedId); + _factory.groupData, fabricIdx, _operationalCredentialsDelegate->GetIPK(), compressedId); if ([self checkForStartError:(CHIP_NO_ERROR == errorCode) logMsg:kErrorIPKInit]) { return; } @@ -312,7 +312,7 @@ - (NSNumber *)controllerNodeId return nil; } __block NSNumber * nodeID; - dispatch_sync(_chipWorkQueue, ^{ + dispatch_sync(_chipWorkQueue, ^ { if (![self isRunning]) { MTR_LOG_ERROR("A controller has no node id if it has not been started"); nodeID = nil; @@ -324,9 +324,9 @@ - (NSNumber *)controllerNodeId } - (BOOL)pairDevice:(uint64_t)deviceID - discriminator:(uint16_t)discriminator - setupPINCode:(uint32_t)setupPINCode - error:(NSError * __autoreleasing *)error + discriminator:(uint16_t)discriminator + setupPINCode:(uint32_t)setupPINCode + error:(NSError * __autoreleasing *)error { __block CHIP_ERROR errorCode = CHIP_ERROR_INCORRECT_STATE; __block BOOL success = NO; @@ -334,7 +334,7 @@ - (BOOL)pairDevice:(uint64_t)deviceID success = ![self checkForError:errorCode logMsg:kErrorNotRunning error:error]; return success; } - dispatch_sync(_chipWorkQueue, ^{ + dispatch_sync(_chipWorkQueue, ^ { std::string manualPairingCode; chip::SetupPayload payload; payload.discriminator = discriminator; @@ -356,10 +356,10 @@ - (BOOL)pairDevice:(uint64_t)deviceID } - (BOOL)pairDevice:(uint64_t)deviceID - address:(NSString *)address - port:(uint16_t)port - setupPINCode:(uint32_t)setupPINCode - error:(NSError * __autoreleasing *)error + address:(NSString *)address + port:(uint16_t)port + setupPINCode:(uint32_t)setupPINCode + error:(NSError * __autoreleasing *)error { __block CHIP_ERROR errorCode = CHIP_ERROR_INCORRECT_STATE; __block BOOL success = NO; @@ -367,7 +367,7 @@ - (BOOL)pairDevice:(uint64_t)deviceID success = ![self checkForError:errorCode logMsg:kErrorNotRunning error:error]; return success; } - dispatch_sync(_chipWorkQueue, ^{ + dispatch_sync(_chipWorkQueue, ^ { chip::Inet::IPAddress addr; chip::Inet::IPAddress::FromString([address UTF8String], addr); chip::Transport::PeerAddress peerAddress = chip::Transport::PeerAddress::UDP(addr, port); @@ -391,7 +391,7 @@ - (BOOL)pairDevice:(uint64_t)deviceID onboardingPayload:(NSString *)onboardingPa success = ![self checkForError:errorCode logMsg:kErrorNotRunning error:error]; return success; } - dispatch_sync(_chipWorkQueue, ^{ + dispatch_sync(_chipWorkQueue, ^ { if ([self isRunning]) { _operationalCredentialsDelegate->SetDeviceID(deviceID); errorCode = self.cppCommissioner->EstablishPASEConnection(deviceID, [onboardingPayload UTF8String]); @@ -402,8 +402,8 @@ - (BOOL)pairDevice:(uint64_t)deviceID onboardingPayload:(NSString *)onboardingPa } - (BOOL)commissionDevice:(uint64_t)deviceId - commissioningParams:(MTRCommissioningParameters *)commissioningParams - error:(NSError * __autoreleasing *)error + commissioningParams:(MTRCommissioningParameters *)commissioningParams + error:(NSError * __autoreleasing *)error { __block CHIP_ERROR errorCode = CHIP_ERROR_INCORRECT_STATE; __block BOOL success = NO; @@ -411,7 +411,7 @@ - (BOOL)commissionDevice:(uint64_t)deviceId success = ![self checkForError:errorCode logMsg:kErrorNotRunning error:error]; return success; } - dispatch_sync(_chipWorkQueue, ^{ + dispatch_sync(_chipWorkQueue, ^ { if ([self isRunning]) { chip::Controller::CommissioningParameters params; if (commissioningParams.CSRNonce) { @@ -420,11 +420,11 @@ - (BOOL)commissionDevice:(uint64_t)deviceId } if (commissioningParams.attestationNonce) { params.SetAttestationNonce(chip::ByteSpan( - (uint8_t *) commissioningParams.attestationNonce.bytes, commissioningParams.attestationNonce.length)); + (uint8_t *) commissioningParams.attestationNonce.bytes, commissioningParams.attestationNonce.length)); } if (commissioningParams.threadOperationalDataset) { params.SetThreadOperationalDataset(chip::ByteSpan((uint8_t *) commissioningParams.threadOperationalDataset.bytes, - commissioningParams.threadOperationalDataset.length)); + commissioningParams.threadOperationalDataset.length)); } if (commissioningParams.wifiSSID && commissioningParams.wifiCredentials) { chip::ByteSpan ssid((uint8_t *) commissioningParams.wifiSSID.bytes, commissioningParams.wifiSSID.length); @@ -439,7 +439,7 @@ - (BOOL)commissionDevice:(uint64_t)deviceId chip::Optional timeoutSecs; if (commissioningParams.failSafeExpiryTimeoutSecs) { timeoutSecs = chip::MakeOptional( - static_cast([commissioningParams.failSafeExpiryTimeoutSecs unsignedIntValue])); + static_cast([commissioningParams.failSafeExpiryTimeoutSecs unsignedIntValue])); } _deviceAttestationDelegateBridge = new MTRDeviceAttestationDelegateBridge( self, commissioningParams.deviceAttestationDelegate, _chipWorkQueue, timeoutSecs); @@ -455,8 +455,8 @@ - (BOOL)commissionDevice:(uint64_t)deviceId } - (BOOL)continueCommissioningDevice:(void *)device - ignoreAttestationFailure:(BOOL)ignoreAttestationFailure - error:(NSError * __autoreleasing *)error + ignoreAttestationFailure:(BOOL)ignoreAttestationFailure + error:(NSError * __autoreleasing *)error { __block CHIP_ERROR errorCode = CHIP_ERROR_INCORRECT_STATE; __block BOOL success = NO; @@ -464,15 +464,15 @@ - (BOOL)continueCommissioningDevice:(void *)device success = ![self checkForError:errorCode logMsg:kErrorNotRunning error:error]; return success; } - dispatch_sync(_chipWorkQueue, ^{ + dispatch_sync(_chipWorkQueue, ^ { if ([self isRunning]) { auto lastAttestationResult = _deviceAttestationDelegateBridge - ? _deviceAttestationDelegateBridge->attestationVerificationResult() - : chip::Credentials::AttestationVerificationResult::kSuccess; + ? _deviceAttestationDelegateBridge->attestationVerificationResult() + : chip::Credentials::AttestationVerificationResult::kSuccess; chip::DeviceProxy * deviceProxy = static_cast(device); errorCode = self.cppCommissioner->ContinueCommissioningAfterDeviceAttestationFailure(deviceProxy, - ignoreAttestationFailure ? chip::Credentials::AttestationVerificationResult::kSuccess : lastAttestationResult); + ignoreAttestationFailure ? chip::Credentials::AttestationVerificationResult::kSuccess : lastAttestationResult); } success = ![self checkForError:errorCode logMsg:kErrorPairDevice error:error]; }); @@ -487,7 +487,7 @@ - (BOOL)stopDevicePairing:(uint64_t)deviceID error:(NSError * __autoreleasing *) success = ![self checkForError:errorCode logMsg:kErrorNotRunning error:error]; return success; } - dispatch_sync(_chipWorkQueue, ^{ + dispatch_sync(_chipWorkQueue, ^ { if ([self isRunning]) { _operationalCredentialsDelegate->ResetDeviceID(); errorCode = self.cppCommissioner->StopPairing(deviceID); @@ -523,13 +523,13 @@ - (BOOL)getDevice:(uint64_t)deviceID queue:(dispatch_queue_t)queue completionHan if (![self isRunning]) { NSError * error; [self checkForError:errorCode logMsg:kErrorNotRunning error:&error]; - dispatch_async(queue, ^{ + dispatch_async(queue, ^ { completionHandler(nil, error); }); return NO; } - dispatch_async(_chipWorkQueue, ^{ + dispatch_async(_chipWorkQueue, ^ { if ([self isRunning]) { MTRDeviceConnectionBridge * connectionBridge = new MTRDeviceConnectionBridge(completionHandler, queue); errorCode = connectionBridge->connect(self->_cppCommissioner, deviceID); @@ -559,7 +559,7 @@ - (BOOL)openPairingWindow:(uint64_t)deviceID duration:(NSUInteger)duration error } err = chip::Controller::AutoCommissioningWindowOpener::OpenBasicCommissioningWindow( - self.cppCommissioner, deviceID, chip::System::Clock::Seconds16(static_cast(duration))); + self.cppCommissioner, deviceID, chip::System::Clock::Seconds16(static_cast(duration))); if (err != CHIP_NO_ERROR) { MTR_LOG_ERROR("Error(%s): Open Pairing Window failed", chip::ErrorStr(err)); @@ -573,10 +573,10 @@ - (BOOL)openPairingWindow:(uint64_t)deviceID duration:(NSUInteger)duration error } - (NSString *)openPairingWindowWithPIN:(uint64_t)deviceID - duration:(NSUInteger)duration - discriminator:(NSUInteger)discriminator - setupPIN:(NSUInteger)setupPIN - error:(NSError * __autoreleasing *)error + duration:(NSUInteger)duration + discriminator:(NSUInteger)discriminator + setupPIN:(NSUInteger)setupPIN + error:(NSError * __autoreleasing *)error { CHIP_ERROR err = CHIP_NO_ERROR; @@ -600,9 +600,9 @@ - (NSString *)openPairingWindowWithPIN:(uint64_t)deviceID chip::SetupPayload setupPayload; err = chip::Controller::AutoCommissioningWindowOpener::OpenCommissioningWindow(self.cppCommissioner, deviceID, - chip::System::Clock::Seconds16(static_cast(duration)), chip::Crypto::kSpake2p_Min_PBKDF_Iterations, - static_cast(discriminator), chip::MakeOptional(static_cast(setupPIN)), chip::NullOptional, - setupPayload); + chip::System::Clock::Seconds16(static_cast(duration)), chip::Crypto::kSpake2p_Min_PBKDF_Iterations, + static_cast(discriminator), chip::MakeOptional(static_cast(setupPIN)), chip::NullOptional, + setupPayload); if (err != CHIP_NO_ERROR) { MTR_LOG_ERROR("Error(%s): Open Pairing Window failed", chip::ErrorStr(err)); @@ -627,7 +627,7 @@ - (NSString *)openPairingWindowWithPIN:(uint64_t)deviceID - (void)setPairingDelegate:(id)delegate queue:(dispatch_queue_t)queue { - dispatch_async(_chipWorkQueue, ^{ + dispatch_async(_chipWorkQueue, ^ { self->_pairingDelegateBridge->setDelegate(delegate, queue); }); } @@ -709,8 +709,8 @@ @implementation MTRDeviceController (InternalMethods) } - (CHIP_ERROR)isRunningOnFabric:(chip::FabricTable *)fabricTable - fabricIndex:(chip::FabricIndex)fabricIndex - isRunning:(BOOL *)isRunning + fabricIndex:(chip::FabricIndex)fabricIndex + isRunning:(BOOL *)isRunning { if (![self isRunning]) { *isRunning = NO; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm index 181295364063ef..e2b10a2353ec7b 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm @@ -49,16 +49,16 @@ - (instancetype)initWithSigningKeypair:(id)nocSigner fabricId:(uint6 } - (instancetype)initWithOperationalKeypair:(id)operationalKeypair - operationalCertificate:(NSData *)operationalCertificate - intermediateCertificate:(nullable NSData *)intermediateCertificate - rootCertificate:(NSData *)rootCertificate - ipk:(NSData *)ipk + operationalCertificate:(NSData *)operationalCertificate + intermediateCertificate:(nullable NSData *)intermediateCertificate + rootCertificate:(NSData *)rootCertificate + ipk:(NSData *)ipk { if (!(self = [super init])) { return nil; } - { // Scope for temporaries + { // Scope for temporaries // ExtractNodeIdFabricIdFromOpCert needs a TLV-encoded opcert, not a DER-encoded one. uint8_t tlvOpCertBuf[Credentials::kMaxCHIPCertLength]; MutableByteSpan tlvOpCert(tlvOpCertBuf); @@ -157,8 +157,8 @@ - (instancetype)initWithParams:(MTRDeviceControllerStartupParams *)params } - (instancetype)initForNewFabric:(chip::FabricTable *)fabricTable - keystore:(chip::Crypto::OperationalKeystore *)keystore - params:(MTRDeviceControllerStartupParams *)params + keystore:(chip::Crypto::OperationalKeystore *)keystore + params:(MTRDeviceControllerStartupParams *)params { if (!(self = [self initWithParams:params])) { return nil; @@ -180,9 +180,9 @@ - (instancetype)initForNewFabric:(chip::FabricTable *)fabricTable if (self.rootCertificate == nil) { NSError * error; self.rootCertificate = [MTRCertificates generateRootCertificate:self.nocSigner - issuerId:nil - fabricId:@(self.fabricId) - error:&error]; + issuerId:nil + fabricId:@(self.fabricId) + error:&error]; if (error != nil || self.rootCertificate == nil) { MTR_LOG_ERROR("Failed to generate root certificate: %@", error); return nil; @@ -196,9 +196,9 @@ - (instancetype)initForNewFabric:(chip::FabricTable *)fabricTable } - (instancetype)initForExistingFabric:(FabricTable *)fabricTable - fabricIndex:(FabricIndex)fabricIndex - keystore:(chip::Crypto::OperationalKeystore *)keystore - params:(MTRDeviceControllerStartupParams *)params + fabricIndex:(FabricIndex)fabricIndex + keystore:(chip::Crypto::OperationalKeystore *)keystore + params:(MTRDeviceControllerStartupParams *)params { if (!(self = [self initWithParams:params])) { return nil; @@ -272,9 +272,9 @@ - (instancetype)initForExistingFabric:(FabricTable *)fabricTable // a new NOC. But we can keep our existing operational keypair and node id; // nothing is forcing us to rotate those. if (usingExistingNOC == YES - && ((oldIntermediateCert == nil) != (self.intermediateCertificate == nil) - || ((oldIntermediateCert != nil) && - [MTRCertificates isCertificate:oldIntermediateCert equalTo:self.intermediateCertificate] == NO))) { + && ((oldIntermediateCert == nil) != (self.intermediateCertificate == nil) + || ((oldIntermediateCert != nil) && + [MTRCertificates isCertificate:oldIntermediateCert equalTo:self.intermediateCertificate] == NO))) { self.operationalCertificate = nil; } diff --git a/src/darwin/Framework/CHIP/MTRDevicePairingDelegateBridge.mm b/src/darwin/Framework/CHIP/MTRDevicePairingDelegateBridge.mm index bd05a12f8950bb..bf40eaccf639ed 100644 --- a/src/darwin/Framework/CHIP/MTRDevicePairingDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTRDevicePairingDelegateBridge.mm @@ -58,7 +58,7 @@ if ([strongDelegate respondsToSelector:@selector(onStatusUpdate:)]) { if (strongDelegate && mQueue) { MTRPairingStatus pairingStatus = MapStatus(status); - dispatch_async(mQueue, ^{ + dispatch_async(mQueue, ^ { [strongDelegate onStatusUpdate:pairingStatus]; }); } @@ -72,7 +72,7 @@ id strongDelegate = mDelegate; if ([strongDelegate respondsToSelector:@selector(onPairingComplete:)]) { if (strongDelegate && mQueue) { - dispatch_async(mQueue, ^{ + dispatch_async(mQueue, ^ { NSError * nsError = [MTRError errorForCHIPErrorCode:error]; [strongDelegate onPairingComplete:nsError]; }); @@ -87,7 +87,7 @@ id strongDelegate = mDelegate; if ([strongDelegate respondsToSelector:@selector(onPairingDeleted:)]) { if (strongDelegate && mQueue) { - dispatch_async(mQueue, ^{ + dispatch_async(mQueue, ^ { NSError * nsError = [MTRError errorForCHIPErrorCode:error]; [strongDelegate onPairingDeleted:nsError]; }); @@ -102,7 +102,7 @@ id strongDelegate = mDelegate; if ([strongDelegate respondsToSelector:@selector(onCommissioningComplete:)]) { if (strongDelegate && mQueue) { - dispatch_async(mQueue, ^{ + dispatch_async(mQueue, ^ { NSError * nsError = [MTRError errorForCHIPErrorCode:error]; [strongDelegate onCommissioningComplete:nsError]; }); diff --git a/src/darwin/Framework/CHIP/MTRError.h b/src/darwin/Framework/CHIP/MTRError.h index f69ce1d73e05d5..f2a779a663c66f 100644 --- a/src/darwin/Framework/CHIP/MTRError.h +++ b/src/darwin/Framework/CHIP/MTRError.h @@ -31,7 +31,7 @@ FOUNDATION_EXPORT NSErrorDomain const MTRInteractionErrorDomain; * MTRInteractionErrorDomain instead. */ // clang-format off -typedef NS_ERROR_ENUM(MTRErrorDomain, MTRErrorCode){ +typedef NS_ERROR_ENUM(MTRErrorDomain, MTRErrorCode) { /** * MTRErrorCodeGeneralError represents a generic Matter error with no * further categorization. @@ -64,7 +64,7 @@ typedef NS_ERROR_ENUM(MTRErrorDomain, MTRErrorCode){ * status. */ // clang-format off -typedef NS_ERROR_ENUM(MTRInteractionErrorDomain, MTRInteractionErrorCode){ +typedef NS_ERROR_ENUM(MTRInteractionErrorDomain, MTRInteractionErrorCode) { // These values come from the general status code table in the Matter // Interaction Model specification. Do not change these values unless the // specification changes. diff --git a/src/darwin/Framework/CHIP/MTRError.mm b/src/darwin/Framework/CHIP/MTRError.mm index e07928fa8659a5..9ab0f82e4347a9 100644 --- a/src/darwin/Framework/CHIP/MTRError.mm +++ b/src/darwin/Framework/CHIP/MTRError.mm @@ -57,33 +57,33 @@ + (NSError *)errorForCHIPErrorCode:(CHIP_ERROR)errorCode if (errorCode == CHIP_ERROR_INVALID_STRING_LENGTH) { code = MTRErrorCodeInvalidStringLength; - [userInfo addEntriesFromDictionary:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"A list length is invalid.", nil) }]; + [userInfo addEntriesFromDictionary:@ { NSLocalizedDescriptionKey : NSLocalizedString(@"A list length is invalid.", nil) }]; } else if (errorCode == CHIP_ERROR_INVALID_INTEGER_VALUE) { code = MTRErrorCodeInvalidIntegerValue; - [userInfo addEntriesFromDictionary:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Unexpected integer value.", nil) }]; + [userInfo addEntriesFromDictionary:@ { NSLocalizedDescriptionKey : NSLocalizedString(@"Unexpected integer value.", nil) }]; } else if (errorCode == CHIP_ERROR_INVALID_ARGUMENT) { code = MTRErrorCodeInvalidArgument; - [userInfo addEntriesFromDictionary:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"An argument is invalid.", nil) }]; + [userInfo addEntriesFromDictionary:@ { NSLocalizedDescriptionKey : NSLocalizedString(@"An argument is invalid.", nil) }]; } else if (errorCode == CHIP_ERROR_INVALID_MESSAGE_LENGTH) { code = MTRErrorCodeInvalidMessageLength; [userInfo - addEntriesFromDictionary:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"A message length is invalid.", nil) }]; + addEntriesFromDictionary:@ { NSLocalizedDescriptionKey : NSLocalizedString(@"A message length is invalid.", nil) }]; } else if (errorCode == CHIP_ERROR_INCORRECT_STATE) { code = MTRErrorCodeInvalidState; - [userInfo addEntriesFromDictionary:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Invalid object state.", nil) }]; + [userInfo addEntriesFromDictionary:@ { NSLocalizedDescriptionKey : NSLocalizedString(@"Invalid object state.", nil) }]; } else if (errorCode == CHIP_ERROR_INTEGRITY_CHECK_FAILED) { code = MTRErrorCodeIntegrityCheckFailed; - [userInfo addEntriesFromDictionary:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Integrity check failed.", nil) }]; + [userInfo addEntriesFromDictionary:@ { NSLocalizedDescriptionKey : NSLocalizedString(@"Integrity check failed.", nil) }]; } else if (errorCode == CHIP_ERROR_TIMEOUT) { code = MTRErrorCodeTimeout; - [userInfo addEntriesFromDictionary:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Transaction timed out.", nil) }]; + [userInfo addEntriesFromDictionary:@ { NSLocalizedDescriptionKey : NSLocalizedString(@"Transaction timed out.", nil) }]; } else { code = MTRErrorCodeGeneralError; - [userInfo addEntriesFromDictionary:@{ - NSLocalizedDescriptionKey : - [NSString stringWithFormat:NSLocalizedString(@"Undefined error:%u.", nil), errorCode.AsInteger()], - @"errorCode" : @(errorCode.AsInteger()), - }]; + [userInfo addEntriesFromDictionary:@ { + NSLocalizedDescriptionKey : + [NSString stringWithFormat:NSLocalizedString(@"Undefined error:%u.", nil), errorCode.AsInteger()], + @"errorCode" : @(errorCode.AsInteger()), + }]; } userInfo[@"underlyingError"] = [[MTRErrorHolder alloc] initWithError:errorCode]; @@ -120,17 +120,17 @@ + (NSError *)errorForIMStatus:(const chip::app::StatusIB &)status } case Status::InvalidAction: { description = NSLocalizedString( - @"The action is malformed, has missing fields, or fields with invalid values. Action not carried out.", nil); + @"The action is malformed, has missing fields, or fields with invalid values. Action not carried out.", nil); break; } case Status::UnsupportedCommand: { description = NSLocalizedString( - @"The specified action or command indicated is not supported on the device. Command or action not carried out.", nil); + @"The specified action or command indicated is not supported on the device. Command or action not carried out.", nil); break; } case Status::InvalidCommand: { description = NSLocalizedString( - @"The cluster command is malformed, has missing fields, or fields with invalid values. Command not carried out.", nil); + @"The cluster command is malformed, has missing fields, or fields with invalid values. Command not carried out.", nil); break; } case Status::UnsupportedAttribute: { @@ -160,8 +160,8 @@ + (NSError *)errorForIMStatus:(const chip::app::StatusIB &)status } case Status::InvalidDataType: { description = NSLocalizedString( - @"The data type indicated is undefined or invalid for the indicated data field. Command or action not carried out.", - nil); + @"The data type indicated is undefined or invalid for the indicated data field. Command or action not carried out.", + nil); break; } case Status::UnsupportedRead: { @@ -178,7 +178,7 @@ + (NSError *)errorForIMStatus:(const chip::app::StatusIB &)status } case Status::Busy: { description = NSLocalizedString( - @"The receiver is busy processing another action that prevents the execution of the incoming action.", nil); + @"The receiver is busy processing another action that prevents the execution of the incoming action.", nil); break; } case Status::UnsupportedCluster: { @@ -193,7 +193,7 @@ + (NSError *)errorForIMStatus:(const chip::app::StatusIB &)status case Status::NeedsTimedInteraction: { description = NSLocalizedString(@"An Untimed Write or Untimed Invoke interaction was used for an attribute or command that " @"requires a Timed Write or Timed Invoke.", - nil); + nil); break; } case Status::UnsupportedEvent: { @@ -264,11 +264,11 @@ + (CHIP_ERROR)errorToCHIPErrorCode:(NSError * _Nullable)error code = static_cast([error.userInfo[@"errorCode"] unsignedLongValue]); break; } - // Weird error we did not create. Fall through. - default: - code = CHIP_ERROR_INTERNAL.AsInteger(); - break; - } + // Weird error we did not create. Fall through. + default: + code = CHIP_ERROR_INTERNAL.AsInteger(); + break; + } } return chip::ChipError(code); diff --git a/src/darwin/Framework/CHIP/MTRIMDispatch.mm b/src/darwin/Framework/CHIP/MTRIMDispatch.mm index c8b1df9f980a21..538bf2c4def5d4 100644 --- a/src/darwin/Framework/CHIP/MTRIMDispatch.mm +++ b/src/darwin/Framework/CHIP/MTRIMDispatch.mm @@ -61,160 +61,164 @@ namespace chip { namespace app { - using Access::SubjectDescriptor; - using Protocols::InteractionModel::Status; - - namespace { - - Status DetermineAttributeStatus(const ConcreteAttributePath & aPath, bool aIsWrite) - { - // We don't have any non-global attributes. - using namespace Globals::Attributes; - - // TODO: Consider making this configurable for applications that are not - // trying to be an OTA provider, though in practice it just affects which - // error is returned. - if (aPath.mEndpointId != kSupportedEndpoint) { - return Status::UnsupportedEndpoint; - } - - // TODO: Consider making this configurable for applications that are not - // trying to be an OTA provider, though in practice it just affects which - // error is returned. - if (aPath.mClusterId != OtaSoftwareUpdateProvider::Id) { - return Status::UnsupportedCluster; - } - - switch (aPath.mAttributeId) { - case AttributeList::Id: - FALLTHROUGH; - case AcceptedCommandList::Id: - FALLTHROUGH; - case GeneratedCommandList::Id: - FALLTHROUGH; - // When EventList is supported, include it here. +using Access::SubjectDescriptor; +using Protocols::InteractionModel::Status; + +namespace { + +Status DetermineAttributeStatus(const ConcreteAttributePath & aPath, bool aIsWrite) +{ + // We don't have any non-global attributes. + using namespace Globals::Attributes; + + // TODO: Consider making this configurable for applications that are not + // trying to be an OTA provider, though in practice it just affects which + // error is returned. + if (aPath.mEndpointId != kSupportedEndpoint) { + return Status::UnsupportedEndpoint; + } + + // TODO: Consider making this configurable for applications that are not + // trying to be an OTA provider, though in practice it just affects which + // error is returned. + if (aPath.mClusterId != OtaSoftwareUpdateProvider::Id) { + return Status::UnsupportedCluster; + } + + switch (aPath.mAttributeId) { + case AttributeList::Id: + FALLTHROUGH; + case AcceptedCommandList::Id: + FALLTHROUGH; + case GeneratedCommandList::Id: + FALLTHROUGH; + // When EventList is supported, include it here. #if 0 case EventList::Id: FALLTHROUGH; #endif - case FeatureMap::Id: - FALLTHROUGH; - case ClusterRevision::Id: - // No permissions for this for read, and none of these are writable for - // write. The writable-or-not check happens before the ACL check. - return aIsWrite ? Status::UnsupportedWrite : Status::UnsupportedAccess; - default: - // No other attributes. - break; - } - - return Status::UnsupportedAttribute; - } - - } // anonymous namespace - - CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, bool aIsFabricFiltered, - const ConcreteReadAttributePath & aPath, AttributeReportIBs::Builder & aAttributeReports, - AttributeValueEncoder::AttributeEncodeState * aEncoderState) - { - Status status = DetermineAttributeStatus(aPath, /* aIsWrite = */ false); - return aAttributeReports.EncodeAttributeStatus(aPath, StatusIB(status)); + case FeatureMap::Id: + FALLTHROUGH; + case ClusterRevision::Id: + // No permissions for this for read, and none of these are writable for + // write. The writable-or-not check happens before the ACL check. + return aIsWrite ? Status::UnsupportedWrite : Status::UnsupportedAccess; + default: + // No other attributes. + break; } - Status ServerClusterCommandExists(const ConcreteCommandPath & aPath) - { - // TODO: Consider making this configurable for applications that are not - // trying to be an OTA provider. - using namespace OtaSoftwareUpdateProvider::Commands; + return Status::UnsupportedAttribute; +} - if (aPath.mEndpointId != kSupportedEndpoint) { - return Status::UnsupportedEndpoint; - } +} // anonymous namespace - if (aPath.mClusterId != OtaSoftwareUpdateProvider::Id) { - return Status::UnsupportedCluster; - } +CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, bool aIsFabricFiltered, + const ConcreteReadAttributePath & aPath, AttributeReportIBs::Builder & aAttributeReports, + AttributeValueEncoder::AttributeEncodeState * aEncoderState) +{ + Status status = DetermineAttributeStatus(aPath, /* aIsWrite = */ false); + return aAttributeReports.EncodeAttributeStatus(aPath, StatusIB(status)); +} - switch (aPath.mCommandId) { - case QueryImage::Id: - FALLTHROUGH; - case ApplyUpdateRequest::Id: - FALLTHROUGH; - case NotifyUpdateApplied::Id: - return Status::Success; - } +Status ServerClusterCommandExists(const ConcreteCommandPath & aPath) +{ + // TODO: Consider making this configurable for applications that are not + // trying to be an OTA provider. + using namespace OtaSoftwareUpdateProvider::Commands; - return Status::UnsupportedCommand; + if (aPath.mEndpointId != kSupportedEndpoint) { + return Status::UnsupportedEndpoint; } - bool IsClusterDataVersionEqual(const ConcreteClusterPath & aConcreteClusterPath, DataVersion aRequiredVersion) - { - // Will never be called anyway; we have no attributes. - return false; + if (aPath.mClusterId != OtaSoftwareUpdateProvider::Id) { + return Status::UnsupportedCluster; } - const EmberAfAttributeMetadata * GetAttributeMetadata(const ConcreteAttributePath & aConcreteClusterPath) - { - // Note: This test does not make use of the real attribute metadata. - static EmberAfAttributeMetadata stub = { .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(uint32_t(0)) }; - return &stub; + switch (aPath.mCommandId) { + case QueryImage::Id: + FALLTHROUGH; + case ApplyUpdateRequest::Id: + FALLTHROUGH; + case NotifyUpdateApplied::Id: + return Status::Success; } - bool IsDeviceTypeOnEndpoint(DeviceTypeId deviceType, EndpointId endpoint) { return false; } + return Status::UnsupportedCommand; +} + +bool IsClusterDataVersionEqual(const ConcreteClusterPath & aConcreteClusterPath, DataVersion aRequiredVersion) +{ + // Will never be called anyway; we have no attributes. + return false; +} - CHIP_ERROR WriteSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, const ConcreteDataAttributePath & aPath, - TLV::TLVReader & aReader, WriteHandler * aWriteHandler) - { - Status status = DetermineAttributeStatus(aPath, /* aIsWrite = */ true); - return aWriteHandler->AddStatus(aPath, status); - } +const EmberAfAttributeMetadata * GetAttributeMetadata(const ConcreteAttributePath & aConcreteClusterPath) +{ + // Note: This test does not make use of the real attribute metadata. + static EmberAfAttributeMetadata stub = { .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(uint32_t(0)) }; + return &stub; +} - // No attribute access overrides on iOS for now. - // TODO (#16806): This function can be moved to InteractionModelEngine. - AttributeAccessInterface * GetAttributeAccessOverride(EndpointId endpointId, ClusterId clusterId) { return nullptr; } - - void DispatchSingleClusterCommand(const ConcreteCommandPath & aPath, TLV::TLVReader & aReader, CommandHandler * aCommandObj) - { - // This command passed ServerClusterCommandExists so we know it's one of our - // supported commands. - using namespace OtaSoftwareUpdateProvider::Commands; - - bool wasHandled = false; - CHIP_ERROR err = CHIP_NO_ERROR; - - switch (aPath.mCommandId) { - case QueryImage::Id: { - QueryImage::DecodableType commandData; - err = DataModel::Decode(aReader, commandData); - if (err == CHIP_NO_ERROR) { - wasHandled = emberAfOtaSoftwareUpdateProviderClusterQueryImageCallback(aCommandObj, aPath, commandData); - } - break; - } - case ApplyUpdateRequest::Id: { - ApplyUpdateRequest::DecodableType commandData; - err = DataModel::Decode(aReader, commandData); - if (err == CHIP_NO_ERROR) { - wasHandled = emberAfOtaSoftwareUpdateProviderClusterApplyUpdateRequestCallback(aCommandObj, aPath, commandData); - } - break; +bool IsDeviceTypeOnEndpoint(DeviceTypeId deviceType, EndpointId endpoint) { + return false; +} + +CHIP_ERROR WriteSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, const ConcreteDataAttributePath & aPath, + TLV::TLVReader & aReader, WriteHandler * aWriteHandler) +{ + Status status = DetermineAttributeStatus(aPath, /* aIsWrite = */ true); + return aWriteHandler->AddStatus(aPath, status); +} + +// No attribute access overrides on iOS for now. +// TODO (#16806): This function can be moved to InteractionModelEngine. +AttributeAccessInterface * GetAttributeAccessOverride(EndpointId endpointId, ClusterId clusterId) { + return nullptr; +} + +void DispatchSingleClusterCommand(const ConcreteCommandPath & aPath, TLV::TLVReader & aReader, CommandHandler * aCommandObj) +{ + // This command passed ServerClusterCommandExists so we know it's one of our + // supported commands. + using namespace OtaSoftwareUpdateProvider::Commands; + + bool wasHandled = false; + CHIP_ERROR err = CHIP_NO_ERROR; + + switch (aPath.mCommandId) { + case QueryImage::Id: { + QueryImage::DecodableType commandData; + err = DataModel::Decode(aReader, commandData); + if (err == CHIP_NO_ERROR) { + wasHandled = emberAfOtaSoftwareUpdateProviderClusterQueryImageCallback(aCommandObj, aPath, commandData); } - case NotifyUpdateApplied::Id: { - NotifyUpdateApplied::DecodableType commandData; - err = DataModel::Decode(aReader, commandData); - if (err == CHIP_NO_ERROR) { - wasHandled = emberAfOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedCallback(aCommandObj, aPath, commandData); - } - break; + break; + } + case ApplyUpdateRequest::Id: { + ApplyUpdateRequest::DecodableType commandData; + err = DataModel::Decode(aReader, commandData); + if (err == CHIP_NO_ERROR) { + wasHandled = emberAfOtaSoftwareUpdateProviderClusterApplyUpdateRequestCallback(aCommandObj, aPath, commandData); } - default: - break; + break; + } + case NotifyUpdateApplied::Id: { + NotifyUpdateApplied::DecodableType commandData; + err = DataModel::Decode(aReader, commandData); + if (err == CHIP_NO_ERROR) { + wasHandled = emberAfOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedCallback(aCommandObj, aPath, commandData); } + break; + } + default: + break; + } - if (CHIP_NO_ERROR != err || !wasHandled) { - aCommandObj->AddStatus(aPath, Status::InvalidCommand); - } + if (CHIP_NO_ERROR != err || !wasHandled) { + aCommandObj->AddStatus(aPath, Status::InvalidCommand); } +} } // namespace app } // namespace chip @@ -239,9 +243,13 @@ uint16_t emberAfFindClusterServerEndpointIndex(EndpointId endpoint, ClusterId cl * endpoint, the OTA Provider cluster, and no attributes (because we * would be erroring out from them anyway). */ -uint16_t emberAfGetServerAttributeCount(EndpointId endpoint, ClusterId cluster) { return 0; } +uint16_t emberAfGetServerAttributeCount(EndpointId endpoint, ClusterId cluster) { + return 0; +} -uint16_t emberAfEndpointCount(void) { return 1; } +uint16_t emberAfEndpointCount(void) { + return 1; +} uint16_t emberAfIndexFromEndpoint(EndpointId endpoint) { @@ -272,7 +280,9 @@ uint16_t emberAfGetServerAttributeIndexByAttributeId(EndpointId endpoint, Cluste return UINT16_MAX; } -bool emberAfContainsAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId) { return false; } +bool emberAfContainsAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId) { + return false; +} uint8_t emberAfClusterCount(EndpointId endpoint, bool server) { @@ -297,4 +307,6 @@ uint8_t emberAfClusterIndex(EndpointId endpoint, ClusterId clusterId, EmberAfClu return UINT8_MAX; } -bool emberAfEndpointIndexIsEnabled(uint16_t index) { return index == 0; } +bool emberAfEndpointIndexIsEnabled(uint16_t index) { + return index == 0; +} diff --git a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm index 8b703e4b317b9b..31c81fd8170c12 100644 --- a/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm +++ b/src/darwin/Framework/CHIP/MTROperationalCredentialsDelegate.mm @@ -41,7 +41,7 @@ using namespace Crypto; CHIP_ERROR MTROperationalCredentialsDelegate::Init(MTRPersistentStorageDelegateBridge * storage, ChipP256KeypairPtr nocSigner, - NSData * ipk, NSData * rootCert, NSData * _Nullable icaCert) + NSData * ipk, NSData * rootCert, NSData * _Nullable icaCert) { if (storage == nil || ipk == nil || rootCert == nil) { return CHIP_ERROR_INVALID_ARGUMENT; @@ -82,11 +82,11 @@ } return GenerateNOC( - *mIssuerKey, (mIntermediateCert != nil) ? mIntermediateCert : mRootCert, nodeId, fabricId, cats, pubkey, noc); + *mIssuerKey, (mIntermediateCert != nil) ? mIntermediateCert : mRootCert, nodeId, fabricId, cats, pubkey, noc); } CHIP_ERROR MTROperationalCredentialsDelegate::GenerateNOC(P256Keypair & signingKeypair, NSData * signingCertificate, NodeId nodeId, - FabricId fabricId, const CATValues & cats, const P256PublicKey & pubkey, MutableByteSpan & noc) + FabricId fabricId, const CATValues & cats, const P256PublicKey & pubkey, MutableByteSpan & noc) { uint32_t validityStart, validityEnd; @@ -113,8 +113,8 @@ } CHIP_ERROR MTROperationalCredentialsDelegate::GenerateNOCChain(const chip::ByteSpan & csrElements, const chip::ByteSpan & csrNonce, - const chip::ByteSpan & attestationSignature, const chip::ByteSpan & attestationChallenge, const chip::ByteSpan & DAC, - const chip::ByteSpan & PAI, chip::Callback::Callback * onCompletion) + const chip::ByteSpan & attestationSignature, const chip::ByteSpan & attestationChallenge, const chip::ByteSpan & DAC, + const chip::ByteSpan & PAI, chip::Callback::Callback * onCompletion) { chip::NodeId assignedId; if (mNodeIdRequested) { @@ -153,12 +153,14 @@ ReturnErrorOnFailure(GenerateNOC(assignedId, mNextFabricId, chip::kUndefinedCATs, pubkey, noc)); onCompletion->mCall(onCompletion->mContext, CHIP_NO_ERROR, noc, IntermediateCertSpan(), RootCertSpan(), MakeOptional(GetIPK()), - Optional()); + Optional()); return CHIP_NO_ERROR; } -ByteSpan MTROperationalCredentialsDelegate::RootCertSpan() const { return AsByteSpan(mRootCert); } +ByteSpan MTROperationalCredentialsDelegate::RootCertSpan() const { + return AsByteSpan(mRootCert); +} ByteSpan MTROperationalCredentialsDelegate::IntermediateCertSpan() const { @@ -173,7 +175,7 @@ { NSDate * date = [NSDate dateWithTimeIntervalSinceNow:offset]; unsigned units = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute - | NSCalendarUnitSecond; + | NSCalendarUnitSecond; NSCalendar * calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; NSDateComponents * components = [calendar components:units fromDate:date]; @@ -198,7 +200,7 @@ uint64_t GetIssuerId(NSNumber * _Nullable providedIssuerId) } // anonymous namespace CHIP_ERROR MTROperationalCredentialsDelegate::GenerateRootCertificate(id keypair, NSNumber * _Nullable issuerId, - NSNumber * _Nullable fabricId, NSData * _Nullable __autoreleasing * _Nonnull rootCert) + NSNumber * _Nullable fabricId, NSData * _Nullable __autoreleasing * _Nonnull rootCert) { *rootCert = nil; MTRP256KeypairBridge keypairBridge; @@ -234,8 +236,8 @@ uint64_t GetIssuerId(NSNumber * _Nullable providedIssuerId) } CHIP_ERROR MTROperationalCredentialsDelegate::GenerateIntermediateCertificate(id rootKeypair, NSData * rootCertificate, - SecKeyRef intermediatePublicKey, NSNumber * _Nullable issuerId, NSNumber * _Nullable fabricId, - NSData * _Nullable __autoreleasing * _Nonnull intermediateCert) + SecKeyRef intermediatePublicKey, NSNumber * _Nullable issuerId, NSNumber * _Nullable fabricId, + NSData * _Nullable __autoreleasing * _Nonnull intermediateCert) { *intermediateCert = nil; @@ -284,8 +286,8 @@ uint64_t GetIssuerId(NSNumber * _Nullable providedIssuerId) } CHIP_ERROR MTROperationalCredentialsDelegate::GenerateOperationalCertificate(id signingKeypair, - NSData * signingCertificate, SecKeyRef operationalPublicKey, NSNumber * fabricId, NSNumber * nodeId, - NSArray * _Nullable caseAuthenticatedTags, NSData * _Nullable __autoreleasing * _Nonnull operationalCert) + NSData * signingCertificate, SecKeyRef operationalPublicKey, NSNumber * fabricId, NSNumber * nodeId, + NSArray * _Nullable caseAuthenticatedTags, NSData * _Nullable __autoreleasing * _Nonnull operationalCert) { *operationalCert = nil; diff --git a/src/darwin/Framework/CHIP/MTRP256KeypairBridge.mm b/src/darwin/Framework/CHIP/MTRP256KeypairBridge.mm index a48c2bccc736f7..5f5bf55f41f726 100644 --- a/src/darwin/Framework/CHIP/MTRP256KeypairBridge.mm +++ b/src/darwin/Framework/CHIP/MTRP256KeypairBridge.mm @@ -29,7 +29,7 @@ CHIP_ERROR MTRP256KeypairBridge::Init(id keypair) { if (![keypair respondsToSelector:@selector(signMessageECDSA_DER:)] - && ![keypair respondsToSelector:@selector(signMessageECDSA_RAW:)]) { + && ![keypair respondsToSelector:@selector(signMessageECDSA_RAW:)]) { // Not a valid MTRKeypair implementation. NSLog(@"Keypair does not support message signing"); return CHIP_ERROR_INVALID_ARGUMENT; @@ -114,7 +114,7 @@ } if (signature.length > out_signature.Capacity()) { MTR_LOG_ERROR("ECDSA sign msg failure: unexpected signature size %llu vs %llu", static_cast(signature.length), - static_cast(out_signature.Capacity())); + static_cast(out_signature.Capacity())); return CHIP_ERROR_NO_MEMORY; } out_signature.SetLength(signature.length); @@ -132,7 +132,9 @@ return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } -CHIP_ERROR MTRP256KeypairBridge::setPubkey() { return MatterPubKeyFromSecKeyRef([mKeypair publicKey], &mPubkey); } +CHIP_ERROR MTRP256KeypairBridge::setPubkey() { + return MatterPubKeyFromSecKeyRef([mKeypair publicKey], &mPubkey); +} CHIP_ERROR MTRP256KeypairBridge::MatterPubKeyFromSecKeyRef(SecKeyRef pubkeyRef, P256PublicKey * matterPubKey) { diff --git a/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.mm b/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.mm index cf74e08ab028df..d3f9b7015f1f1a 100644 --- a/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTRPersistentStorageDelegateBridge.mm @@ -34,7 +34,7 @@ __block CHIP_ERROR error = CHIP_NO_ERROR; NSString * keyString = [NSString stringWithUTF8String:key]; - dispatch_sync(mWorkQueue, ^{ + dispatch_sync(mWorkQueue, ^ { NSLog(@"PersistentStorageDelegate Sync Get Value for Key: %@", keyString); NSData * value = [mDelegate storageDataForKey:keyString]; @@ -75,7 +75,7 @@ NSData * valueData = (value == nullptr) ? [NSData data] : [NSData dataWithBytes:value length:size]; __block CHIP_ERROR error = CHIP_NO_ERROR; - dispatch_sync(mWorkQueue, ^{ + dispatch_sync(mWorkQueue, ^ { NSLog(@"PersistentStorageDelegate Set Key %@", keyString); if ([mDelegate setStorageData:valueData forKey:keyString] == NO) { @@ -91,7 +91,7 @@ NSString * keyString = [NSString stringWithUTF8String:key]; __block CHIP_ERROR error = CHIP_NO_ERROR; - dispatch_sync(mWorkQueue, ^{ + dispatch_sync(mWorkQueue, ^ { NSLog(@"PersistentStorageDelegate Delete Key: %@", keyString); if ([mDelegate removeStorageDataForKey:keyString] == NO) { diff --git a/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.mm b/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.mm index 945551724ca798..c905591ffb4a60 100644 --- a/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.mm +++ b/src/darwin/Framework/CHIP/MTRThreadOperationalDataset.mm @@ -35,11 +35,11 @@ @interface MTRThreadOperationalDataset () @implementation MTRThreadOperationalDataset - (nullable instancetype)initWithNetworkName:(NSString *)networkName - extendedPANID:(NSData *)extendedPANID - masterKey:(NSData *)masterKey - PSKc:(NSData *)PSKc - channel:(uint16_t)channel - panID:(NSData *)panID + extendedPANID:(NSData *)extendedPANID + masterKey:(NSData *)masterKey + PSKc:(NSData *)PSKc + channel:(uint16_t)channel + panID:(NSData *)panID { if (self = [super init]) { _networkName = networkName; @@ -136,11 +136,11 @@ - (nullable instancetype)initWithData:(NSData *)data panID = CFSwapInt16BigToHost(panID); return [self initWithNetworkName:[NSString stringWithUTF8String:networkName] - extendedPANID:[NSData dataWithBytes:extendedPANID length:MTRSizeThreadExtendedPanId] - masterKey:[NSData dataWithBytes:masterKey length:MTRSizeThreadMasterKey] - PSKc:[NSData dataWithBytes:pskc length:MTRSizeThreadPSKc] - channel:channel - panID:[NSData dataWithBytes:&panID length:sizeof(uint16_t)]]; + extendedPANID:[NSData dataWithBytes:extendedPANID length:MTRSizeThreadExtendedPanId] + masterKey:[NSData dataWithBytes:masterKey length:MTRSizeThreadMasterKey] + PSKc:[NSData dataWithBytes:pskc length:MTRSizeThreadPSKc] + channel:channel + panID:[NSData dataWithBytes:&panID length:sizeof(uint16_t)]]; } - (NSData *)data diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 9bf7ccc8eab641..856e79bf186d4d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -67,7 +67,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -93,7 +93,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -119,7 +119,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -187,7 +187,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -213,7 +213,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -239,7 +239,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -366,7 +366,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -392,7 +392,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -418,7 +418,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -534,7 +534,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -560,7 +560,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -586,7 +586,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -665,7 +665,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -691,7 +691,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -717,7 +717,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -948,7 +948,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -974,7 +974,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1000,7 +1000,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1156,7 +1156,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1182,7 +1182,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1208,7 +1208,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1265,7 +1265,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1293,7 +1293,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1319,7 +1319,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1345,7 +1345,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1371,7 +1371,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1397,7 +1397,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1423,7 +1423,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1480,7 +1480,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1527,7 +1527,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1553,7 +1553,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1579,7 +1579,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1636,7 +1636,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1648,7 +1648,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & if (entry_0.subjects.IsNull()) { newElement_0.subjects = nil; } else { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_3 = [NSMutableArray new]; auto iter_3 = entry_0.subjects.Value().begin(); while (iter_3.Next()) { @@ -1668,7 +1668,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & if (entry_0.targets.IsNull()) { newElement_0.targets = nil; } else { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_3 = [NSMutableArray new]; auto iter_3 = entry_0.targets.Value().begin(); while (iter_3.Next()) { @@ -1720,7 +1720,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1781,7 +1781,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1807,7 +1807,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1833,7 +1833,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1890,7 +1890,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1899,8 +1899,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & newElement_0 = [MTRBridgedActionsClusterActionStruct new]; newElement_0.actionID = [NSNumber numberWithUnsignedShort:entry_0.actionID]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; newElement_0.supportedCommands = [NSNumber numberWithUnsignedShort:entry_0.supportedCommands]; @@ -1924,7 +1924,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -1933,10 +1933,10 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & newElement_0 = [MTRBridgedActionsClusterEndpointListStruct new]; newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.endpoints.begin(); while (iter_2.Next()) { @@ -1982,7 +1982,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2008,7 +2008,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2034,7 +2034,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2313,7 +2313,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2339,7 +2339,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2365,7 +2365,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2422,7 +2422,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2448,7 +2448,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2474,7 +2474,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2531,7 +2531,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2597,7 +2597,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2623,7 +2623,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2649,7 +2649,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2717,15 +2717,15 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSString * newElement_0; newElement_0 = [[NSString alloc] initWithBytes:entry_0.data() - length:entry_0.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2745,7 +2745,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2771,7 +2771,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2797,7 +2797,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2876,7 +2876,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2902,7 +2902,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2928,7 +2928,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -2954,7 +2954,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3022,7 +3022,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3048,7 +3048,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3074,7 +3074,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3131,7 +3131,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3157,7 +3157,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3183,7 +3183,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3209,7 +3209,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3376,7 +3376,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3479,7 +3479,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3626,7 +3626,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3652,7 +3652,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3678,7 +3678,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3704,7 +3704,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3818,7 +3818,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3844,7 +3844,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3870,7 +3870,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -3938,7 +3938,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4044,7 +4044,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4070,7 +4070,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4096,7 +4096,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4153,7 +4153,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4179,7 +4179,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4205,7 +4205,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4262,7 +4262,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4270,8 +4270,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & MTRGeneralDiagnosticsClusterNetworkInterfaceType * newElement_0; newElement_0 = [MTRGeneralDiagnosticsClusterNetworkInterfaceType new]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; newElement_0.isOperational = [NSNumber numberWithBool:entry_0.isOperational]; if (entry_0.offPremiseServicesReachableIPv4.IsNull()) { newElement_0.offPremiseServicesReachableIPv4 = nil; @@ -4286,8 +4286,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv6.Value()]; } newElement_0.hardwareAddress = [NSData dataWithBytes:entry_0.hardwareAddress.data() - length:entry_0.hardwareAddress.size()]; - { // Scope for our temporary variables + length:entry_0.hardwareAddress.size()]; + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.IPv4Addresses.begin(); while (iter_2.Next()) { @@ -4303,7 +4303,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } newElement_0.iPv4Addresses = array_2; } - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.IPv6Addresses.begin(); while (iter_2.Next()) { @@ -4383,7 +4383,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4409,7 +4409,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4435,7 +4435,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4472,7 +4472,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4498,7 +4498,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4524,7 +4524,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4581,7 +4581,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4591,8 +4591,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & newElement_0.id = [NSNumber numberWithUnsignedLongLong:entry_0.id]; if (entry_0.name.HasValue()) { newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() - length:entry_0.name.Value().size() - encoding:NSUTF8StringEncoding]; + length:entry_0.name.Value().size() + encoding:NSUTF8StringEncoding]; } else { newElement_0.name = nil; } @@ -4663,7 +4663,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4689,7 +4689,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4715,7 +4715,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4806,8 +4806,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & value = nil; } else { value = [[NSString alloc] initWithBytes:cppValue.Value().data() - length:cppValue.Value().size() - encoding:NSUTF8StringEncoding]; + length:cppValue.Value().size() + encoding:NSUTF8StringEncoding]; } return value; } @@ -4875,7 +4875,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -4923,7 +4923,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -5600,7 +5600,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -5626,7 +5626,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -5652,7 +5652,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -5678,7 +5678,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -5898,7 +5898,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -5924,7 +5924,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -5950,7 +5950,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6118,7 +6118,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6144,7 +6144,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6170,7 +6170,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6392,7 +6392,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6418,7 +6418,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6444,7 +6444,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6534,7 +6534,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6560,7 +6560,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6586,7 +6586,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6676,7 +6676,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6702,7 +6702,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6728,7 +6728,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6785,7 +6785,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6818,7 +6818,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6826,13 +6826,13 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & MTROperationalCredentialsClusterFabricDescriptor * newElement_0; newElement_0 = [MTROperationalCredentialsClusterFabricDescriptor new]; newElement_0.rootPublicKey = [NSData dataWithBytes:entry_0.rootPublicKey.data() - length:entry_0.rootPublicKey.size()]; + length:entry_0.rootPublicKey.size()]; newElement_0.vendorId = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0.vendorId)]; newElement_0.fabricId = [NSNumber numberWithUnsignedLongLong:entry_0.fabricId]; newElement_0.nodeId = [NSNumber numberWithUnsignedLongLong:entry_0.nodeId]; newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } @@ -6875,7 +6875,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6912,7 +6912,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6938,7 +6938,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -6964,7 +6964,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7021,7 +7021,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7050,7 +7050,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7058,7 +7058,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & MTRGroupKeyManagementClusterGroupInfoMapStruct * newElement_0; newElement_0 = [MTRGroupKeyManagementClusterGroupInfoMapStruct new]; newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.endpoints.begin(); while (iter_2.Next()) { @@ -7076,8 +7076,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } if (entry_0.groupName.HasValue()) { newElement_0.groupName = [[NSString alloc] initWithBytes:entry_0.groupName.Value().data() - length:entry_0.groupName.Value().size() - encoding:NSUTF8StringEncoding]; + length:entry_0.groupName.Value().size() + encoding:NSUTF8StringEncoding]; } else { newElement_0.groupName = nil; } @@ -7123,7 +7123,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7149,7 +7149,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7175,7 +7175,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7232,7 +7232,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7240,11 +7240,11 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & MTRFixedLabelClusterLabelStruct * newElement_0; newElement_0 = [MTRFixedLabelClusterLabelStruct new]; newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.value.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -7264,7 +7264,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7290,7 +7290,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7316,7 +7316,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7373,7 +7373,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7381,11 +7381,11 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & MTRUserLabelClusterLabelStruct * newElement_0; newElement_0 = [MTRUserLabelClusterLabelStruct new]; newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.value.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -7405,7 +7405,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7431,7 +7431,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7457,7 +7457,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7525,7 +7525,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7551,7 +7551,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7577,7 +7577,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7660,7 +7660,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7668,10 +7668,10 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & MTRModeSelectClusterModeOptionStruct * newElement_0; newElement_0 = [MTRModeSelectClusterModeOptionStruct new]; newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.semanticTags.begin(); while (iter_2.Next()) { @@ -7749,7 +7749,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7775,7 +7775,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -7801,7 +7801,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -8262,7 +8262,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -8288,7 +8288,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -8314,7 +8314,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -8645,7 +8645,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -8671,7 +8671,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -8697,7 +8697,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -8864,7 +8864,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -8890,7 +8890,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -8916,7 +8916,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -9298,7 +9298,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -9324,7 +9324,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -9350,7 +9350,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -9990,7 +9990,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -10016,7 +10016,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -10042,7 +10042,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -10228,7 +10228,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -10254,7 +10254,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -10280,7 +10280,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -10370,7 +10370,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -10396,7 +10396,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -10422,7 +10422,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -11091,7 +11091,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -11117,7 +11117,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -11143,7 +11143,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -11271,7 +11271,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -11297,7 +11297,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -11323,7 +11323,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -11436,7 +11436,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -11462,7 +11462,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -11488,7 +11488,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -11668,7 +11668,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -11694,7 +11694,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -11720,7 +11720,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -11833,7 +11833,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -11859,7 +11859,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -11885,7 +11885,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -11998,7 +11998,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12024,7 +12024,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12050,7 +12050,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12239,7 +12239,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12265,7 +12265,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12291,7 +12291,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12359,7 +12359,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12385,7 +12385,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12411,7 +12411,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12468,7 +12468,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12479,22 +12479,22 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; if (entry_0.name.HasValue()) { newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() - length:entry_0.name.Value().size() - encoding:NSUTF8StringEncoding]; + length:entry_0.name.Value().size() + encoding:NSUTF8StringEncoding]; } else { newElement_0.name = nil; } if (entry_0.callSign.HasValue()) { newElement_0.callSign = [[NSString alloc] initWithBytes:entry_0.callSign.Value().data() - length:entry_0.callSign.Value().size() - encoding:NSUTF8StringEncoding]; + length:entry_0.callSign.Value().size() + encoding:NSUTF8StringEncoding]; } else { newElement_0.callSign = nil; } if (entry_0.affiliateCallSign.HasValue()) { newElement_0.affiliateCallSign = [[NSString alloc] initWithBytes:entry_0.affiliateCallSign.Value().data() - length:entry_0.affiliateCallSign.Value().size() - encoding:NSUTF8StringEncoding]; + length:entry_0.affiliateCallSign.Value().size() + encoding:NSUTF8StringEncoding]; } else { newElement_0.affiliateCallSign = nil; } @@ -12522,19 +12522,19 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } else { value = [MTRChannelClusterLineupInfo new]; value.operatorName = [[NSString alloc] initWithBytes:cppValue.Value().operatorName.data() - length:cppValue.Value().operatorName.size() - encoding:NSUTF8StringEncoding]; + length:cppValue.Value().operatorName.size() + encoding:NSUTF8StringEncoding]; if (cppValue.Value().lineupName.HasValue()) { value.lineupName = [[NSString alloc] initWithBytes:cppValue.Value().lineupName.Value().data() - length:cppValue.Value().lineupName.Value().size() - encoding:NSUTF8StringEncoding]; + length:cppValue.Value().lineupName.Value().size() + encoding:NSUTF8StringEncoding]; } else { value.lineupName = nil; } if (cppValue.Value().postalCode.HasValue()) { value.postalCode = [[NSString alloc] initWithBytes:cppValue.Value().postalCode.Value().data() - length:cppValue.Value().postalCode.Value().size() - encoding:NSUTF8StringEncoding]; + length:cppValue.Value().postalCode.Value().size() + encoding:NSUTF8StringEncoding]; } else { value.postalCode = nil; } @@ -12558,22 +12558,22 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & value.minorNumber = [NSNumber numberWithUnsignedShort:cppValue.Value().minorNumber]; if (cppValue.Value().name.HasValue()) { value.name = [[NSString alloc] initWithBytes:cppValue.Value().name.Value().data() - length:cppValue.Value().name.Value().size() - encoding:NSUTF8StringEncoding]; + length:cppValue.Value().name.Value().size() + encoding:NSUTF8StringEncoding]; } else { value.name = nil; } if (cppValue.Value().callSign.HasValue()) { value.callSign = [[NSString alloc] initWithBytes:cppValue.Value().callSign.Value().data() - length:cppValue.Value().callSign.Value().size() - encoding:NSUTF8StringEncoding]; + length:cppValue.Value().callSign.Value().size() + encoding:NSUTF8StringEncoding]; } else { value.callSign = nil; } if (cppValue.Value().affiliateCallSign.HasValue()) { value.affiliateCallSign = [[NSString alloc] initWithBytes:cppValue.Value().affiliateCallSign.Value().data() - length:cppValue.Value().affiliateCallSign.Value().size() - encoding:NSUTF8StringEncoding]; + length:cppValue.Value().affiliateCallSign.Value().size() + encoding:NSUTF8StringEncoding]; } else { value.affiliateCallSign = nil; } @@ -12588,7 +12588,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12614,7 +12614,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12640,7 +12640,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12697,7 +12697,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12706,8 +12706,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & newElement_0 = [MTRTargetNavigatorClusterTargetInfo new]; newElement_0.identifier = [NSNumber numberWithUnsignedChar:entry_0.identifier]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -12738,7 +12738,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12764,7 +12764,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12790,7 +12790,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12950,7 +12950,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -12976,7 +12976,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13002,7 +13002,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13059,7 +13059,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13069,11 +13069,11 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; newElement_0.inputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.inputType)]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; newElement_0.descriptionString = [[NSString alloc] initWithBytes:entry_0.description.data() - length:entry_0.description.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.description.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -13104,7 +13104,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13130,7 +13130,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13156,7 +13156,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13213,7 +13213,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13239,7 +13239,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13265,7 +13265,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13322,7 +13322,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13348,7 +13348,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13374,7 +13374,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13431,15 +13431,15 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSString * newElement_0; newElement_0 = [[NSString alloc] initWithBytes:entry_0.data() - length:entry_0.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -13470,7 +13470,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13496,7 +13496,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13522,7 +13522,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13579,7 +13579,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13589,8 +13589,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; newElement_0.outputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.outputType)]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -13621,7 +13621,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13647,7 +13647,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13673,7 +13673,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13730,7 +13730,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13763,8 +13763,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & value.application = [MTRApplicationLauncherClusterApplication new]; value.application.catalogVendorId = [NSNumber numberWithUnsignedShort:cppValue.Value().application.catalogVendorId]; value.application.applicationId = [[NSString alloc] initWithBytes:cppValue.Value().application.applicationId.data() - length:cppValue.Value().application.applicationId.size() - encoding:NSUTF8StringEncoding]; + length:cppValue.Value().application.applicationId.size() + encoding:NSUTF8StringEncoding]; if (cppValue.Value().endpoint.HasValue()) { value.endpoint = [NSNumber numberWithUnsignedShort:cppValue.Value().endpoint.Value()]; } else { @@ -13781,7 +13781,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13807,7 +13807,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13833,7 +13833,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13937,8 +13937,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & value = [MTRApplicationBasicClusterApplicationBasicApplication new]; value.catalogVendorId = [NSNumber numberWithUnsignedShort:cppValue.catalogVendorId]; value.applicationId = [[NSString alloc] initWithBytes:cppValue.applicationId.data() - length:cppValue.applicationId.size() - encoding:NSUTF8StringEncoding]; + length:cppValue.applicationId.size() + encoding:NSUTF8StringEncoding]; return value; } case Attributes::Status::Id: { @@ -13971,7 +13971,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -13997,7 +13997,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -14023,7 +14023,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -14049,7 +14049,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -14106,7 +14106,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -14132,7 +14132,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -14158,7 +14158,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -15623,7 +15623,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -15649,7 +15649,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -15675,7 +15675,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -16018,7 +16018,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -16044,7 +16044,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -16070,7 +16070,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -16164,7 +16164,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -16195,13 +16195,13 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & newElement_0.nullableString = nil; } else { newElement_0.nullableString = [[NSString alloc] initWithBytes:entry_0.nullableString.Value().data() - length:entry_0.nullableString.Value().size() - encoding:NSUTF8StringEncoding]; + length:entry_0.nullableString.Value().size() + encoding:NSUTF8StringEncoding]; } if (entry_0.optionalString.HasValue()) { newElement_0.optionalString = [[NSString alloc] initWithBytes:entry_0.optionalString.Value().data() - length:entry_0.optionalString.Value().size() - encoding:NSUTF8StringEncoding]; + length:entry_0.optionalString.Value().size() + encoding:NSUTF8StringEncoding]; } else { newElement_0.optionalString = nil; } @@ -16211,8 +16211,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } else { newElement_0.nullableOptionalString = [[NSString alloc] initWithBytes:entry_0.nullableOptionalString.Value().Value().data() - length:entry_0.nullableOptionalString.Value().Value().size() - encoding:NSUTF8StringEncoding]; + length:entry_0.nullableOptionalString.Value().Value().size() + encoding:NSUTF8StringEncoding]; } } else { newElement_0.nullableOptionalString = nil; @@ -16226,10 +16226,10 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & newElement_0.nullableStruct.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.nullableStruct.Value().c)]; newElement_0.nullableStruct.d = [NSData dataWithBytes:entry_0.nullableStruct.Value().d.data() - length:entry_0.nullableStruct.Value().d.size()]; + length:entry_0.nullableStruct.Value().d.size()]; newElement_0.nullableStruct.e = [[NSString alloc] initWithBytes:entry_0.nullableStruct.Value().e.data() - length:entry_0.nullableStruct.Value().e.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.nullableStruct.Value().e.size() + encoding:NSUTF8StringEncoding]; newElement_0.nullableStruct.f = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().f.Raw()]; newElement_0.nullableStruct.g = [NSNumber numberWithFloat:entry_0.nullableStruct.Value().g]; newElement_0.nullableStruct.h = [NSNumber numberWithDouble:entry_0.nullableStruct.Value().h]; @@ -16241,10 +16241,10 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & newElement_0.optionalStruct.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.optionalStruct.Value().c)]; newElement_0.optionalStruct.d = [NSData dataWithBytes:entry_0.optionalStruct.Value().d.data() - length:entry_0.optionalStruct.Value().d.size()]; + length:entry_0.optionalStruct.Value().d.size()]; newElement_0.optionalStruct.e = [[NSString alloc] initWithBytes:entry_0.optionalStruct.Value().e.data() - length:entry_0.optionalStruct.Value().e.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.optionalStruct.Value().e.size() + encoding:NSUTF8StringEncoding]; newElement_0.optionalStruct.f = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().f.Raw()]; newElement_0.optionalStruct.g = [NSNumber numberWithFloat:entry_0.optionalStruct.Value().g]; newElement_0.optionalStruct.h = [NSNumber numberWithDouble:entry_0.optionalStruct.Value().h]; @@ -16261,14 +16261,14 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & newElement_0.nullableOptionalStruct.b = [NSNumber numberWithBool:entry_0.nullableOptionalStruct.Value().Value().b]; newElement_0.nullableOptionalStruct.c = [NSNumber - numberWithUnsignedChar:chip::to_underlying(entry_0.nullableOptionalStruct.Value().Value().c)]; + numberWithUnsignedChar:chip::to_underlying(entry_0.nullableOptionalStruct.Value().Value().c)]; newElement_0.nullableOptionalStruct.d = [NSData dataWithBytes:entry_0.nullableOptionalStruct.Value().Value().d.data() - length:entry_0.nullableOptionalStruct.Value().Value().d.size()]; + length:entry_0.nullableOptionalStruct.Value().Value().d.size()]; newElement_0.nullableOptionalStruct.e = [[NSString alloc] initWithBytes:entry_0.nullableOptionalStruct.Value().Value().e.data() - length:entry_0.nullableOptionalStruct.Value().Value().e.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.nullableOptionalStruct.Value().Value().e.size() + encoding:NSUTF8StringEncoding]; newElement_0.nullableOptionalStruct.f = [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().f.Raw()]; newElement_0.nullableOptionalStruct.g = @@ -16282,7 +16282,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & if (entry_0.nullableList.IsNull()) { newElement_0.nullableList = nil; } else { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_3 = [NSMutableArray new]; auto iter_3 = entry_0.nullableList.Value().begin(); while (iter_3.Next()) { @@ -16300,7 +16300,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } } if (entry_0.optionalList.HasValue()) { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_3 = [NSMutableArray new]; auto iter_3 = entry_0.optionalList.Value().begin(); while (iter_3.Next()) { @@ -16323,7 +16323,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & if (entry_0.nullableOptionalList.Value().IsNull()) { newElement_0.nullableOptionalList = nil; } else { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_4 = [NSMutableArray new]; auto iter_4 = entry_0.nullableOptionalList.Value().Value().begin(); while (iter_4.Next()) { @@ -16436,7 +16436,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -16462,7 +16462,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -16494,22 +16494,22 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } newElement_0.fabricSensitiveCharString = [[NSString alloc] initWithBytes:entry_0.fabricSensitiveCharString.data() - length:entry_0.fabricSensitiveCharString.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.fabricSensitiveCharString.size() + encoding:NSUTF8StringEncoding]; newElement_0.fabricSensitiveStruct = [MTRTestClusterClusterSimpleStruct new]; newElement_0.fabricSensitiveStruct.a = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveStruct.a]; newElement_0.fabricSensitiveStruct.b = [NSNumber numberWithBool:entry_0.fabricSensitiveStruct.b]; newElement_0.fabricSensitiveStruct.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.fabricSensitiveStruct.c)]; newElement_0.fabricSensitiveStruct.d = [NSData dataWithBytes:entry_0.fabricSensitiveStruct.d.data() - length:entry_0.fabricSensitiveStruct.d.size()]; + length:entry_0.fabricSensitiveStruct.d.size()]; newElement_0.fabricSensitiveStruct.e = [[NSString alloc] initWithBytes:entry_0.fabricSensitiveStruct.e.data() - length:entry_0.fabricSensitiveStruct.e.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.fabricSensitiveStruct.e.size() + encoding:NSUTF8StringEncoding]; newElement_0.fabricSensitiveStruct.f = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveStruct.f.Raw()]; newElement_0.fabricSensitiveStruct.g = [NSNumber numberWithFloat:entry_0.fabricSensitiveStruct.g]; newElement_0.fabricSensitiveStruct.h = [NSNumber numberWithDouble:entry_0.fabricSensitiveStruct.h]; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.fabricSensitiveInt8uList.begin(); while (iter_2.Next()) { @@ -16983,8 +16983,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & value = nil; } else { value = [[NSString alloc] initWithBytes:cppValue.Value().data() - length:cppValue.Value().size() - encoding:NSUTF8StringEncoding]; + length:cppValue.Value().size() + encoding:NSUTF8StringEncoding]; } return value; } @@ -17020,8 +17020,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & value.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().c)]; value.d = [NSData dataWithBytes:cppValue.Value().d.data() length:cppValue.Value().d.size()]; value.e = [[NSString alloc] initWithBytes:cppValue.Value().e.data() - length:cppValue.Value().e.size() - encoding:NSUTF8StringEncoding]; + length:cppValue.Value().e.size() + encoding:NSUTF8StringEncoding]; value.f = [NSNumber numberWithUnsignedChar:cppValue.Value().f.Raw()]; value.g = [NSNumber numberWithFloat:cppValue.Value().g]; value.h = [NSNumber numberWithDouble:cppValue.Value().h]; @@ -17096,7 +17096,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -17122,7 +17122,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { @@ -17148,7 +17148,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & return nil; } NSArray * _Nonnull value; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.begin(); while (iter_0.Next()) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index 3f5f4d2c1fc5bf..c5b7d5a0c1a7a5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -23,7 +23,9 @@ #include -void MTRDefaultSuccessCallbackBridge::OnSuccessFn(void * context) { DispatchSuccess(context, nil); }; +void MTRDefaultSuccessCallbackBridge::OnSuccessFn(void * context) { + DispatchSuccess(context, nil); +}; void MTRCommandSuccessCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::NullObjectType &) { @@ -737,7 +739,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -776,7 +778,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -815,7 +817,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -854,7 +856,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -893,7 +895,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -932,7 +934,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -971,7 +973,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1010,7 +1012,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1049,7 +1051,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1088,7 +1090,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1127,7 +1129,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1166,7 +1168,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1205,7 +1207,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1245,7 +1247,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1285,7 +1287,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1324,7 +1326,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1363,7 +1365,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1402,7 +1404,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1441,7 +1443,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1480,7 +1482,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1519,7 +1521,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1555,10 +1557,10 @@ } void MTRDescriptorDeviceListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1599,7 +1601,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1638,7 +1640,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1677,7 +1679,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1716,7 +1718,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1755,7 +1757,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1794,7 +1796,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1830,10 +1832,10 @@ } void MTRBindingBindingListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1893,7 +1895,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1932,7 +1934,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -1971,7 +1973,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2007,11 +2009,11 @@ } void MTRAccessControlAclListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2023,7 +2025,7 @@ if (entry_0.subjects.IsNull()) { newElement_0.subjects = nil; } else { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_3 = [NSMutableArray new]; auto iter_3 = entry_0.subjects.Value().begin(); while (iter_3.Next()) { @@ -2043,7 +2045,7 @@ if (entry_0.targets.IsNull()) { newElement_0.targets = nil; } else { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_3 = [NSMutableArray new]; auto iter_3 = entry_0.targets.Value().begin(); while (iter_3.Next()) { @@ -2105,10 +2107,10 @@ } void MTRAccessControlExtensionListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2149,7 +2151,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2188,7 +2190,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2227,7 +2229,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2263,10 +2265,10 @@ } void MTRBridgedActionsActionListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2275,8 +2277,8 @@ newElement_0 = [MTRBridgedActionsClusterActionStruct new]; newElement_0.actionID = [NSNumber numberWithUnsignedShort:entry_0.actionID]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; newElement_0.supportedCommands = [NSNumber numberWithUnsignedShort:entry_0.supportedCommands]; @@ -2310,11 +2312,11 @@ } void MTRBridgedActionsEndpointListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2323,10 +2325,10 @@ newElement_0 = [MTRBridgedActionsClusterEndpointListStruct new]; newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.endpoints.begin(); while (iter_2.Next()) { @@ -2374,7 +2376,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2413,7 +2415,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2452,7 +2454,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2517,7 +2519,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2556,7 +2558,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2595,7 +2597,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2634,7 +2636,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2674,7 +2676,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2714,7 +2716,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2750,11 +2752,11 @@ } void MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< + const chip::app::DataModel::DecodableList< chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2797,7 +2799,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2837,7 +2839,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2877,7 +2879,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2916,7 +2918,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2955,7 +2957,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -2995,7 +2997,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3035,7 +3037,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3074,7 +3076,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3114,7 +3116,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3153,7 +3155,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3192,7 +3194,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3231,7 +3233,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3270,7 +3272,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3309,7 +3311,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3348,7 +3350,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3387,7 +3389,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3427,7 +3429,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3467,7 +3469,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3506,7 +3508,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3545,7 +3547,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3584,7 +3586,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3623,7 +3625,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3662,7 +3664,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3701,7 +3703,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3767,7 +3769,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3806,7 +3808,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3845,7 +3847,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3881,11 +3883,11 @@ } void MTRNetworkCommissioningNetworksListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3926,7 +3928,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -3965,7 +3967,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4004,7 +4006,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4043,7 +4045,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4082,7 +4084,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4121,7 +4123,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4157,11 +4159,11 @@ } void MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< + const chip::app::DataModel::DecodableList< chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4169,8 +4171,8 @@ MTRGeneralDiagnosticsClusterNetworkInterfaceType * newElement_0; newElement_0 = [MTRGeneralDiagnosticsClusterNetworkInterfaceType new]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; newElement_0.isOperational = [NSNumber numberWithBool:entry_0.isOperational]; if (entry_0.offPremiseServicesReachableIPv4.IsNull()) { newElement_0.offPremiseServicesReachableIPv4 = nil; @@ -4185,8 +4187,8 @@ [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv6.Value()]; } newElement_0.hardwareAddress = [NSData dataWithBytes:entry_0.hardwareAddress.data() - length:entry_0.hardwareAddress.size()]; - { // Scope for our temporary variables + length:entry_0.hardwareAddress.size()]; + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.IPv4Addresses.begin(); while (iter_2.Next()) { @@ -4202,7 +4204,7 @@ } newElement_0.iPv4Addresses = array_2; } - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.IPv6Addresses.begin(); while (iter_2.Next()) { @@ -4251,7 +4253,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4290,7 +4292,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4329,7 +4331,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4368,7 +4370,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4407,7 +4409,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4446,7 +4448,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4482,11 +4484,11 @@ } void MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4496,8 +4498,8 @@ newElement_0.id = [NSNumber numberWithUnsignedLongLong:entry_0.id]; if (entry_0.name.HasValue()) { newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() - length:entry_0.name.Value().size() - encoding:NSUTF8StringEncoding]; + length:entry_0.name.Value().size() + encoding:NSUTF8StringEncoding]; } else { newElement_0.name = nil; } @@ -4548,7 +4550,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4587,7 +4589,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4626,7 +4628,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4662,11 +4664,11 @@ } void MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< + const chip::app::DataModel::DecodableList< chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTable::DecodableType> & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4724,11 +4726,11 @@ } void MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4774,7 +4776,7 @@ } void MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & + const chip::app::DataModel::Nullable & value) { MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable objCValue; @@ -4805,7 +4807,7 @@ } void MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable< + const chip::app::DataModel::Nullable< chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> & value) { MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable objCValue; @@ -4851,7 +4853,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4891,7 +4893,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4931,7 +4933,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -4971,7 +4973,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5010,7 +5012,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5049,7 +5051,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5088,7 +5090,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5127,7 +5129,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5167,7 +5169,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5207,7 +5209,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5246,7 +5248,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5285,7 +5287,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5324,7 +5326,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5363,7 +5365,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5402,7 +5404,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5441,7 +5443,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5480,7 +5482,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5520,7 +5522,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5560,7 +5562,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5596,11 +5598,11 @@ } void MTROperationalCredentialsNOCsListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5643,11 +5645,11 @@ } void MTROperationalCredentialsFabricsListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< + const chip::app::DataModel::DecodableList< chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5659,8 +5661,8 @@ newElement_0.fabricId = [NSNumber numberWithUnsignedLongLong:entry_0.fabricId]; newElement_0.nodeId = [NSNumber numberWithUnsignedLongLong:entry_0.nodeId]; newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } @@ -5694,7 +5696,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5734,7 +5736,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5773,7 +5775,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5812,7 +5814,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5848,11 +5850,11 @@ } void MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5891,11 +5893,11 @@ } void MTRGroupKeyManagementGroupTableListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5903,7 +5905,7 @@ MTRGroupKeyManagementClusterGroupInfoMapStruct * newElement_0; newElement_0 = [MTRGroupKeyManagementClusterGroupInfoMapStruct new]; newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.endpoints.begin(); while (iter_2.Next()) { @@ -5921,8 +5923,8 @@ } if (entry_0.groupName.HasValue()) { newElement_0.groupName = [[NSString alloc] initWithBytes:entry_0.groupName.Value().data() - length:entry_0.groupName.Value().size() - encoding:NSUTF8StringEncoding]; + length:entry_0.groupName.Value().size() + encoding:NSUTF8StringEncoding]; } else { newElement_0.groupName = nil; } @@ -5959,7 +5961,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -5998,7 +6000,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6037,7 +6039,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6073,10 +6075,10 @@ } void MTRFixedLabelLabelListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6084,11 +6086,11 @@ MTRFixedLabelClusterLabelStruct * newElement_0; newElement_0 = [MTRFixedLabelClusterLabelStruct new]; newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.value.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -6121,7 +6123,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6160,7 +6162,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6199,7 +6201,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6235,10 +6237,10 @@ } void MTRUserLabelLabelListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6246,11 +6248,11 @@ MTRUserLabelClusterLabelStruct * newElement_0; newElement_0 = [MTRUserLabelClusterLabelStruct new]; newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.value.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -6283,7 +6285,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6322,7 +6324,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6361,7 +6363,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6400,7 +6402,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6439,7 +6441,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6478,7 +6480,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6514,10 +6516,10 @@ } void MTRModeSelectSupportedModesListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6525,10 +6527,10 @@ MTRModeSelectClusterModeOptionStruct * newElement_0; newElement_0 = [MTRModeSelectClusterModeOptionStruct new]; newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.semanticTags.begin(); while (iter_2.Next()) { @@ -6578,7 +6580,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6617,7 +6619,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6656,7 +6658,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6791,7 +6793,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6830,7 +6832,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -6869,7 +6871,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7004,7 +7006,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7043,7 +7045,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7082,7 +7084,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7121,7 +7123,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7160,7 +7162,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7199,7 +7201,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7262,7 +7264,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7302,7 +7304,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7342,7 +7344,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7381,7 +7383,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7420,7 +7422,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7459,7 +7461,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7498,7 +7500,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7537,7 +7539,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7576,7 +7578,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7615,7 +7617,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7638,7 +7640,7 @@ void * context) { auto * self = static_cast( - context); + context); if (!self->mQueue) { return; } @@ -7656,7 +7658,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7697,7 +7699,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7738,7 +7740,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7777,7 +7779,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7816,7 +7818,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7855,7 +7857,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7894,7 +7896,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7933,7 +7935,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -7972,7 +7974,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8011,7 +8013,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8050,7 +8052,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8089,7 +8091,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8128,7 +8130,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8167,7 +8169,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8206,7 +8208,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8245,7 +8247,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8284,7 +8286,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8323,7 +8325,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8363,7 +8365,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8403,7 +8405,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8442,7 +8444,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8481,7 +8483,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8520,7 +8522,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8559,7 +8561,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8598,7 +8600,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8637,7 +8639,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8673,10 +8675,10 @@ } void MTRChannelChannelListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8687,22 +8689,22 @@ newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; if (entry_0.name.HasValue()) { newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() - length:entry_0.name.Value().size() - encoding:NSUTF8StringEncoding]; + length:entry_0.name.Value().size() + encoding:NSUTF8StringEncoding]; } else { newElement_0.name = nil; } if (entry_0.callSign.HasValue()) { newElement_0.callSign = [[NSString alloc] initWithBytes:entry_0.callSign.Value().data() - length:entry_0.callSign.Value().size() - encoding:NSUTF8StringEncoding]; + length:entry_0.callSign.Value().size() + encoding:NSUTF8StringEncoding]; } else { newElement_0.callSign = nil; } if (entry_0.affiliateCallSign.HasValue()) { newElement_0.affiliateCallSign = [[NSString alloc] initWithBytes:entry_0.affiliateCallSign.Value().data() - length:entry_0.affiliateCallSign.Value().size() - encoding:NSUTF8StringEncoding]; + length:entry_0.affiliateCallSign.Value().size() + encoding:NSUTF8StringEncoding]; } else { newElement_0.affiliateCallSign = nil; } @@ -8743,19 +8745,19 @@ } else { objCValue = [MTRChannelClusterLineupInfo new]; objCValue.operatorName = [[NSString alloc] initWithBytes:value.Value().operatorName.data() - length:value.Value().operatorName.size() - encoding:NSUTF8StringEncoding]; + length:value.Value().operatorName.size() + encoding:NSUTF8StringEncoding]; if (value.Value().lineupName.HasValue()) { objCValue.lineupName = [[NSString alloc] initWithBytes:value.Value().lineupName.Value().data() - length:value.Value().lineupName.Value().size() - encoding:NSUTF8StringEncoding]; + length:value.Value().lineupName.Value().size() + encoding:NSUTF8StringEncoding]; } else { objCValue.lineupName = nil; } if (value.Value().postalCode.HasValue()) { objCValue.postalCode = [[NSString alloc] initWithBytes:value.Value().postalCode.Value().data() - length:value.Value().postalCode.Value().size() - encoding:NSUTF8StringEncoding]; + length:value.Value().postalCode.Value().size() + encoding:NSUTF8StringEncoding]; } else { objCValue.postalCode = nil; } @@ -8792,22 +8794,22 @@ objCValue.minorNumber = [NSNumber numberWithUnsignedShort:value.Value().minorNumber]; if (value.Value().name.HasValue()) { objCValue.name = [[NSString alloc] initWithBytes:value.Value().name.Value().data() - length:value.Value().name.Value().size() - encoding:NSUTF8StringEncoding]; + length:value.Value().name.Value().size() + encoding:NSUTF8StringEncoding]; } else { objCValue.name = nil; } if (value.Value().callSign.HasValue()) { objCValue.callSign = [[NSString alloc] initWithBytes:value.Value().callSign.Value().data() - length:value.Value().callSign.Value().size() - encoding:NSUTF8StringEncoding]; + length:value.Value().callSign.Value().size() + encoding:NSUTF8StringEncoding]; } else { objCValue.callSign = nil; } if (value.Value().affiliateCallSign.HasValue()) { objCValue.affiliateCallSign = [[NSString alloc] initWithBytes:value.Value().affiliateCallSign.Value().data() - length:value.Value().affiliateCallSign.Value().size() - encoding:NSUTF8StringEncoding]; + length:value.Value().affiliateCallSign.Value().size() + encoding:NSUTF8StringEncoding]; } else { objCValue.affiliateCallSign = nil; } @@ -8835,7 +8837,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8874,7 +8876,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8913,7 +8915,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8949,10 +8951,10 @@ } void MTRTargetNavigatorTargetListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -8961,8 +8963,8 @@ newElement_0 = [MTRTargetNavigatorClusterTargetInfo new]; newElement_0.identifier = [NSNumber numberWithUnsignedChar:entry_0.identifier]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -8995,7 +8997,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9034,7 +9036,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9073,7 +9075,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9109,7 +9111,7 @@ } void MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { MTRMediaPlaybackClusterPlaybackPosition * _Nullable objCValue; if (value.IsNull()) { @@ -9146,7 +9148,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9185,7 +9187,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9224,7 +9226,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9260,10 +9262,10 @@ } void MTRMediaInputInputListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9273,11 +9275,11 @@ newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; newElement_0.inputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.inputType)]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; newElement_0.descriptionString = [[NSString alloc] initWithBytes:entry_0.description.data() - length:entry_0.description.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.description.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -9310,7 +9312,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9349,7 +9351,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9388,7 +9390,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9427,7 +9429,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9466,7 +9468,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9505,7 +9507,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9544,7 +9546,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9583,7 +9585,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9622,7 +9624,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9661,7 +9663,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9700,7 +9702,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9739,7 +9741,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9778,7 +9780,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9814,10 +9816,10 @@ } void MTRAudioOutputOutputListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9827,8 +9829,8 @@ newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; newElement_0.outputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.outputType)]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -9861,7 +9863,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9900,7 +9902,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9939,7 +9941,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -9978,7 +9980,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10014,7 +10016,7 @@ } void MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { MTRApplicationLauncherClusterApplicationEP * _Nullable objCValue; if (value.IsNull()) { @@ -10024,8 +10026,8 @@ objCValue.application = [MTRApplicationLauncherClusterApplication new]; objCValue.application.catalogVendorId = [NSNumber numberWithUnsignedShort:value.Value().application.catalogVendorId]; objCValue.application.applicationId = [[NSString alloc] initWithBytes:value.Value().application.applicationId.data() - length:value.Value().application.applicationId.size() - encoding:NSUTF8StringEncoding]; + length:value.Value().application.applicationId.size() + encoding:NSUTF8StringEncoding]; if (value.Value().endpoint.HasValue()) { objCValue.endpoint = [NSNumber numberWithUnsignedShort:value.Value().endpoint.Value()]; } else { @@ -10055,7 +10057,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10094,7 +10096,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10133,7 +10135,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10175,8 +10177,8 @@ objCValue = [MTRApplicationBasicClusterApplicationBasicApplication new]; objCValue.catalogVendorId = [NSNumber numberWithUnsignedShort:value.catalogVendorId]; objCValue.applicationId = [[NSString alloc] initWithBytes:value.applicationId.data() - length:value.applicationId.size() - encoding:NSUTF8StringEncoding]; + length:value.applicationId.size() + encoding:NSUTF8StringEncoding]; DispatchSuccess(context, objCValue); }; @@ -10200,7 +10202,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10239,7 +10241,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10278,7 +10280,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10317,7 +10319,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10356,7 +10358,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10395,7 +10397,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10434,7 +10436,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10473,7 +10475,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10512,7 +10514,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10551,7 +10553,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10686,7 +10688,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10725,7 +10727,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10761,11 +10763,11 @@ } void MTRTestClusterListStructOctetStringListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10803,11 +10805,11 @@ } void MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< + const chip::app::DataModel::DecodableList< chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -10838,13 +10840,13 @@ newElement_0.nullableString = nil; } else { newElement_0.nullableString = [[NSString alloc] initWithBytes:entry_0.nullableString.Value().data() - length:entry_0.nullableString.Value().size() - encoding:NSUTF8StringEncoding]; + length:entry_0.nullableString.Value().size() + encoding:NSUTF8StringEncoding]; } if (entry_0.optionalString.HasValue()) { newElement_0.optionalString = [[NSString alloc] initWithBytes:entry_0.optionalString.Value().data() - length:entry_0.optionalString.Value().size() - encoding:NSUTF8StringEncoding]; + length:entry_0.optionalString.Value().size() + encoding:NSUTF8StringEncoding]; } else { newElement_0.optionalString = nil; } @@ -10854,8 +10856,8 @@ } else { newElement_0.nullableOptionalString = [[NSString alloc] initWithBytes:entry_0.nullableOptionalString.Value().Value().data() - length:entry_0.nullableOptionalString.Value().Value().size() - encoding:NSUTF8StringEncoding]; + length:entry_0.nullableOptionalString.Value().Value().size() + encoding:NSUTF8StringEncoding]; } } else { newElement_0.nullableOptionalString = nil; @@ -10869,10 +10871,10 @@ newElement_0.nullableStruct.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.nullableStruct.Value().c)]; newElement_0.nullableStruct.d = [NSData dataWithBytes:entry_0.nullableStruct.Value().d.data() - length:entry_0.nullableStruct.Value().d.size()]; + length:entry_0.nullableStruct.Value().d.size()]; newElement_0.nullableStruct.e = [[NSString alloc] initWithBytes:entry_0.nullableStruct.Value().e.data() - length:entry_0.nullableStruct.Value().e.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.nullableStruct.Value().e.size() + encoding:NSUTF8StringEncoding]; newElement_0.nullableStruct.f = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().f.Raw()]; newElement_0.nullableStruct.g = [NSNumber numberWithFloat:entry_0.nullableStruct.Value().g]; newElement_0.nullableStruct.h = [NSNumber numberWithDouble:entry_0.nullableStruct.Value().h]; @@ -10884,10 +10886,10 @@ newElement_0.optionalStruct.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.optionalStruct.Value().c)]; newElement_0.optionalStruct.d = [NSData dataWithBytes:entry_0.optionalStruct.Value().d.data() - length:entry_0.optionalStruct.Value().d.size()]; + length:entry_0.optionalStruct.Value().d.size()]; newElement_0.optionalStruct.e = [[NSString alloc] initWithBytes:entry_0.optionalStruct.Value().e.data() - length:entry_0.optionalStruct.Value().e.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.optionalStruct.Value().e.size() + encoding:NSUTF8StringEncoding]; newElement_0.optionalStruct.f = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().f.Raw()]; newElement_0.optionalStruct.g = [NSNumber numberWithFloat:entry_0.optionalStruct.Value().g]; newElement_0.optionalStruct.h = [NSNumber numberWithDouble:entry_0.optionalStruct.Value().h]; @@ -10907,11 +10909,11 @@ [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.nullableOptionalStruct.Value().Value().c)]; newElement_0.nullableOptionalStruct.d = [NSData dataWithBytes:entry_0.nullableOptionalStruct.Value().Value().d.data() - length:entry_0.nullableOptionalStruct.Value().Value().d.size()]; + length:entry_0.nullableOptionalStruct.Value().Value().d.size()]; newElement_0.nullableOptionalStruct.e = [[NSString alloc] initWithBytes:entry_0.nullableOptionalStruct.Value().Value().e.data() - length:entry_0.nullableOptionalStruct.Value().Value().e.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.nullableOptionalStruct.Value().Value().e.size() + encoding:NSUTF8StringEncoding]; newElement_0.nullableOptionalStruct.f = [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().f.Raw()]; newElement_0.nullableOptionalStruct.g = @@ -10925,7 +10927,7 @@ if (entry_0.nullableList.IsNull()) { newElement_0.nullableList = nil; } else { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_3 = [NSMutableArray new]; auto iter_3 = entry_0.nullableList.Value().begin(); while (iter_3.Next()) { @@ -10943,7 +10945,7 @@ } } if (entry_0.optionalList.HasValue()) { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_3 = [NSMutableArray new]; auto iter_3 = entry_0.optionalList.Value().begin(); while (iter_3.Next()) { @@ -10966,7 +10968,7 @@ if (entry_0.nullableOptionalList.Value().IsNull()) { newElement_0.nullableOptionalList = nil; } else { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_4 = [NSMutableArray new]; auto iter_4 = entry_0.nullableOptionalList.Value().Value().begin(); while (iter_4.Next()) { @@ -11050,7 +11052,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -11086,10 +11088,10 @@ } void MTRTestClusterListFabricScopedListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -11120,22 +11122,22 @@ newElement_0.nullableOptionalFabricSensitiveInt8u = nil; } newElement_0.fabricSensitiveCharString = [[NSString alloc] initWithBytes:entry_0.fabricSensitiveCharString.data() - length:entry_0.fabricSensitiveCharString.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.fabricSensitiveCharString.size() + encoding:NSUTF8StringEncoding]; newElement_0.fabricSensitiveStruct = [MTRTestClusterClusterSimpleStruct new]; newElement_0.fabricSensitiveStruct.a = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveStruct.a]; newElement_0.fabricSensitiveStruct.b = [NSNumber numberWithBool:entry_0.fabricSensitiveStruct.b]; newElement_0.fabricSensitiveStruct.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.fabricSensitiveStruct.c)]; newElement_0.fabricSensitiveStruct.d = [NSData dataWithBytes:entry_0.fabricSensitiveStruct.d.data() - length:entry_0.fabricSensitiveStruct.d.size()]; + length:entry_0.fabricSensitiveStruct.d.size()]; newElement_0.fabricSensitiveStruct.e = [[NSString alloc] initWithBytes:entry_0.fabricSensitiveStruct.e.data() - length:entry_0.fabricSensitiveStruct.e.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.fabricSensitiveStruct.e.size() + encoding:NSUTF8StringEncoding]; newElement_0.fabricSensitiveStruct.f = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveStruct.f.Raw()]; newElement_0.fabricSensitiveStruct.g = [NSNumber numberWithFloat:entry_0.fabricSensitiveStruct.g]; newElement_0.fabricSensitiveStruct.h = [NSNumber numberWithDouble:entry_0.fabricSensitiveStruct.h]; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.fabricSensitiveInt8uList.begin(); while (iter_2.Next()) { @@ -11293,7 +11295,7 @@ } void MTRTestClusterNullableStructStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { MTRTestClusterClusterSimpleStruct * _Nullable objCValue; if (value.IsNull()) { @@ -11305,8 +11307,8 @@ objCValue.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value().c)]; objCValue.d = [NSData dataWithBytes:value.Value().d.data() length:value.Value().d.size()]; objCValue.e = [[NSString alloc] initWithBytes:value.Value().e.data() - length:value.Value().e.size() - encoding:NSUTF8StringEncoding]; + length:value.Value().e.size() + encoding:NSUTF8StringEncoding]; objCValue.f = [NSNumber numberWithUnsignedChar:value.Value().f.Raw()]; objCValue.g = [NSNumber numberWithFloat:value.Value().g]; objCValue.h = [NSNumber numberWithDouble:value.Value().h]; @@ -11334,7 +11336,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -11373,7 +11375,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -11412,7 +11414,7 @@ void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = value.begin(); while (iter_0.Next()) { @@ -11472,8 +11474,8 @@ } { response.groupName = [[NSString alloc] initWithBytes:data.groupName.data() - length:data.groupName.size() - encoding:NSUTF8StringEncoding]; + length:data.groupName.size() + encoding:NSUTF8StringEncoding]; } DispatchSuccess(context, response); }; @@ -11490,7 +11492,7 @@ } } { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = data.groupList.begin(); while (iter_0.Next()) { @@ -11562,15 +11564,15 @@ { if (data.sceneName.HasValue()) { response.sceneName = [[NSString alloc] initWithBytes:data.sceneName.Value().data() - length:data.sceneName.Value().size() - encoding:NSUTF8StringEncoding]; + length:data.sceneName.Value().size() + encoding:NSUTF8StringEncoding]; } else { response.sceneName = nil; } } { if (data.extensionFieldSets.HasValue()) { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_1 = [NSMutableArray new]; auto iter_1 = data.extensionFieldSets.Value().begin(); while (iter_1.Next()) { @@ -11578,7 +11580,7 @@ MTRScenesClusterExtensionFieldSet * newElement_1; newElement_1 = [MTRScenesClusterExtensionFieldSet new]; newElement_1.clusterId = [NSNumber numberWithUnsignedInt:entry_1.clusterId]; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_3 = [NSMutableArray new]; auto iter_3 = entry_1.attributeValueList.begin(); while (iter_3.Next()) { @@ -11590,7 +11592,7 @@ } else { newElement_3.attributeId = nil; } - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_5 = [NSMutableArray new]; auto iter_5 = entry_3.attributeValue.begin(); while (iter_5.Next()) { @@ -11695,7 +11697,7 @@ } { if (data.sceneList.HasValue()) { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_1 = [NSMutableArray new]; auto iter_1 = data.sceneList.Value().begin(); while (iter_1.Next()) { @@ -11757,15 +11759,15 @@ { if (data.sceneName.HasValue()) { response.sceneName = [[NSString alloc] initWithBytes:data.sceneName.Value().data() - length:data.sceneName.Value().size() - encoding:NSUTF8StringEncoding]; + length:data.sceneName.Value().size() + encoding:NSUTF8StringEncoding]; } else { response.sceneName = nil; } } { if (data.extensionFieldSets.HasValue()) { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_1 = [NSMutableArray new]; auto iter_1 = data.extensionFieldSets.Value().begin(); while (iter_1.Next()) { @@ -11773,7 +11775,7 @@ MTRScenesClusterExtensionFieldSet * newElement_1; newElement_1 = [MTRScenesClusterExtensionFieldSet new]; newElement_1.clusterId = [NSNumber numberWithUnsignedInt:entry_1.clusterId]; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_3 = [NSMutableArray new]; auto iter_3 = entry_1.attributeValueList.begin(); while (iter_3.Next()) { @@ -11785,7 +11787,7 @@ } else { newElement_3.attributeId = nil; } - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_5 = [NSMutableArray new]; auto iter_5 = entry_3.attributeValue.begin(); while (iter_5.Next()) { @@ -11859,8 +11861,8 @@ { if (data.imageURI.HasValue()) { response.imageURI = [[NSString alloc] initWithBytes:data.imageURI.Value().data() - length:data.imageURI.Value().size() - encoding:NSUTF8StringEncoding]; + length:data.imageURI.Value().size() + encoding:NSUTF8StringEncoding]; } else { response.imageURI = nil; } @@ -11875,8 +11877,8 @@ { if (data.softwareVersionString.HasValue()) { response.softwareVersionString = [[NSString alloc] initWithBytes:data.softwareVersionString.Value().data() - length:data.softwareVersionString.Value().size() - encoding:NSUTF8StringEncoding]; + length:data.softwareVersionString.Value().size() + encoding:NSUTF8StringEncoding]; } else { response.softwareVersionString = nil; } @@ -11898,7 +11900,7 @@ { if (data.metadataForRequestor.HasValue()) { response.metadataForRequestor = [NSData dataWithBytes:data.metadataForRequestor.Value().data() - length:data.metadataForRequestor.Value().size()]; + length:data.metadataForRequestor.Value().size()]; } else { response.metadataForRequestor = nil; } @@ -11928,8 +11930,8 @@ } { response.debugText = [[NSString alloc] initWithBytes:data.debugText.data() - length:data.debugText.size() - encoding:NSUTF8StringEncoding]; + length:data.debugText.size() + encoding:NSUTF8StringEncoding]; } DispatchSuccess(context, response); }; @@ -11943,8 +11945,8 @@ } { response.debugText = [[NSString alloc] initWithBytes:data.debugText.data() - length:data.debugText.size() - encoding:NSUTF8StringEncoding]; + length:data.debugText.size() + encoding:NSUTF8StringEncoding]; } DispatchSuccess(context, response); }; @@ -11958,8 +11960,8 @@ } { response.debugText = [[NSString alloc] initWithBytes:data.debugText.data() - length:data.debugText.size() - encoding:NSUTF8StringEncoding]; + length:data.debugText.size() + encoding:NSUTF8StringEncoding]; } DispatchSuccess(context, response); }; @@ -11974,15 +11976,15 @@ { if (data.debugText.HasValue()) { response.debugText = [[NSString alloc] initWithBytes:data.debugText.Value().data() - length:data.debugText.Value().size() - encoding:NSUTF8StringEncoding]; + length:data.debugText.Value().size() + encoding:NSUTF8StringEncoding]; } else { response.debugText = nil; } } { if (data.wiFiScanResults.HasValue()) { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_1 = [NSMutableArray new]; auto iter_1 = data.wiFiScanResults.Value().begin(); while (iter_1.Next()) { @@ -12010,7 +12012,7 @@ } { if (data.threadScanResults.HasValue()) { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_1 = [NSMutableArray new]; auto iter_1 = data.threadScanResults.Value().begin(); while (iter_1.Next()) { @@ -12020,12 +12022,12 @@ newElement_1.panId = [NSNumber numberWithUnsignedShort:entry_1.panId]; newElement_1.extendedPanId = [NSNumber numberWithUnsignedLongLong:entry_1.extendedPanId]; newElement_1.networkName = [[NSString alloc] initWithBytes:entry_1.networkName.data() - length:entry_1.networkName.size() - encoding:NSUTF8StringEncoding]; + length:entry_1.networkName.size() + encoding:NSUTF8StringEncoding]; newElement_1.channel = [NSNumber numberWithUnsignedShort:entry_1.channel]; newElement_1.version = [NSNumber numberWithUnsignedChar:entry_1.version]; newElement_1.extendedAddress = [NSData dataWithBytes:entry_1.extendedAddress.data() - length:entry_1.extendedAddress.size()]; + length:entry_1.extendedAddress.size()]; newElement_1.rssi = [NSNumber numberWithChar:entry_1.rssi]; newElement_1.lqi = [NSNumber numberWithUnsignedChar:entry_1.lqi]; [array_1 addObject:newElement_1]; @@ -12054,8 +12056,8 @@ { if (data.debugText.HasValue()) { response.debugText = [[NSString alloc] initWithBytes:data.debugText.Value().data() - length:data.debugText.Value().size() - encoding:NSUTF8StringEncoding]; + length:data.debugText.Value().size() + encoding:NSUTF8StringEncoding]; } else { response.debugText = nil; } @@ -12080,8 +12082,8 @@ { if (data.debugText.HasValue()) { response.debugText = [[NSString alloc] initWithBytes:data.debugText.Value().data() - length:data.debugText.Value().size() - encoding:NSUTF8StringEncoding]; + length:data.debugText.Value().size() + encoding:NSUTF8StringEncoding]; } else { response.debugText = nil; } @@ -12121,7 +12123,7 @@ auto * response = [MTROperationalCredentialsClusterAttestationResponseParams new]; { response.attestationElements = [NSData dataWithBytes:data.attestationElements.data() - length:data.attestationElements.size()]; + length:data.attestationElements.size()]; } { response.signature = [NSData dataWithBytes:data.signature.data() length:data.signature.size()]; @@ -12148,7 +12150,7 @@ } { response.attestationSignature = [NSData dataWithBytes:data.attestationSignature.data() - length:data.attestationSignature.size()]; + length:data.attestationSignature.size()]; } DispatchSuccess(context, response); }; @@ -12170,8 +12172,8 @@ { if (data.debugText.HasValue()) { response.debugText = [[NSString alloc] initWithBytes:data.debugText.Value().data() - length:data.debugText.Value().size() - encoding:NSUTF8StringEncoding]; + length:data.debugText.Value().size() + encoding:NSUTF8StringEncoding]; } else { response.debugText = nil; } @@ -12192,7 +12194,7 @@ response.groupKeySet.epochKey0 = nil; } else { response.groupKeySet.epochKey0 = [NSData dataWithBytes:data.groupKeySet.epochKey0.Value().data() - length:data.groupKeySet.epochKey0.Value().size()]; + length:data.groupKeySet.epochKey0.Value().size()]; } if (data.groupKeySet.epochStartTime0.IsNull()) { response.groupKeySet.epochStartTime0 = nil; @@ -12203,7 +12205,7 @@ response.groupKeySet.epochKey1 = nil; } else { response.groupKeySet.epochKey1 = [NSData dataWithBytes:data.groupKeySet.epochKey1.Value().data() - length:data.groupKeySet.epochKey1.Value().size()]; + length:data.groupKeySet.epochKey1.Value().size()]; } if (data.groupKeySet.epochStartTime1.IsNull()) { response.groupKeySet.epochStartTime1 = nil; @@ -12214,7 +12216,7 @@ response.groupKeySet.epochKey2 = nil; } else { response.groupKeySet.epochKey2 = [NSData dataWithBytes:data.groupKeySet.epochKey2.Value().data() - length:data.groupKeySet.epochKey2.Value().size()]; + length:data.groupKeySet.epochKey2.Value().size()]; } if (data.groupKeySet.epochStartTime2.IsNull()) { response.groupKeySet.epochStartTime2 = nil; @@ -12230,7 +12232,7 @@ { auto * response = [MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams new]; { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = data.groupKeySetIDs.begin(); while (iter_0.Next()) { @@ -12377,8 +12379,8 @@ response.userName = nil; } else { response.userName = [[NSString alloc] initWithBytes:data.userName.Value().data() - length:data.userName.Value().size() - encoding:NSUTF8StringEncoding]; + length:data.userName.Value().size() + encoding:NSUTF8StringEncoding]; } } { @@ -12413,7 +12415,7 @@ if (data.credentials.IsNull()) { response.credentials = nil; } else { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_1 = [NSMutableArray new]; auto iter_1 = data.credentials.Value().begin(); while (iter_1.Next()) { @@ -12533,7 +12535,7 @@ response.modeForSequence = [NSNumber numberWithUnsignedChar:data.modeForSequence.Raw()]; } { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = data.transitions.begin(); while (iter_0.Next()) { @@ -12574,8 +12576,8 @@ { if (data.data.HasValue()) { response.data = [[NSString alloc] initWithBytes:data.data.Value().data() - length:data.data.Value().size() - encoding:NSUTF8StringEncoding]; + length:data.data.Value().size() + encoding:NSUTF8StringEncoding]; } else { response.data = nil; } @@ -12593,8 +12595,8 @@ { if (data.data.HasValue()) { response.data = [[NSString alloc] initWithBytes:data.data.Value().data() - length:data.data.Value().size() - encoding:NSUTF8StringEncoding]; + length:data.data.Value().size() + encoding:NSUTF8StringEncoding]; } else { response.data = nil; } @@ -12612,8 +12614,8 @@ { if (data.data.HasValue()) { response.data = [[NSString alloc] initWithBytes:data.data.Value().data() - length:data.data.Value().size() - encoding:NSUTF8StringEncoding]; + length:data.data.Value().size() + encoding:NSUTF8StringEncoding]; } else { response.data = nil; } @@ -12641,8 +12643,8 @@ { if (data.data.HasValue()) { response.data = [[NSString alloc] initWithBytes:data.data.Value().data() - length:data.data.Value().size() - encoding:NSUTF8StringEncoding]; + length:data.data.Value().size() + encoding:NSUTF8StringEncoding]; } else { response.data = nil; } @@ -12669,8 +12671,8 @@ auto * response = [MTRAccountLoginClusterGetSetupPINResponseParams new]; { response.setupPIN = [[NSString alloc] initWithBytes:data.setupPIN.data() - length:data.setupPIN.size() - encoding:NSUTF8StringEncoding]; + length:data.setupPIN.size() + encoding:NSUTF8StringEncoding]; } DispatchSuccess(context, response); }; @@ -12710,7 +12712,7 @@ { auto * response = [MTRTestClusterClusterTestStructArrayArgumentResponseParams new]; { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = data.arg1.begin(); while (iter_0.Next()) { @@ -12725,12 +12727,12 @@ newElement_0.c.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c.c)]; newElement_0.c.d = [NSData dataWithBytes:entry_0.c.d.data() length:entry_0.c.d.size()]; newElement_0.c.e = [[NSString alloc] initWithBytes:entry_0.c.e.data() - length:entry_0.c.e.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.c.e.size() + encoding:NSUTF8StringEncoding]; newElement_0.c.f = [NSNumber numberWithUnsignedChar:entry_0.c.f.Raw()]; newElement_0.c.g = [NSNumber numberWithFloat:entry_0.c.g]; newElement_0.c.h = [NSNumber numberWithDouble:entry_0.c.h]; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.d.begin(); while (iter_2.Next()) { @@ -12742,8 +12744,8 @@ newElement_2.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.c)]; newElement_2.d = [NSData dataWithBytes:entry_2.d.data() length:entry_2.d.size()]; newElement_2.e = [[NSString alloc] initWithBytes:entry_2.e.data() - length:entry_2.e.size() - encoding:NSUTF8StringEncoding]; + length:entry_2.e.size() + encoding:NSUTF8StringEncoding]; newElement_2.f = [NSNumber numberWithUnsignedChar:entry_2.f.Raw()]; newElement_2.g = [NSNumber numberWithFloat:entry_2.g]; newElement_2.h = [NSNumber numberWithDouble:entry_2.h]; @@ -12756,7 +12758,7 @@ } newElement_0.d = array_2; } - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.e.begin(); while (iter_2.Next()) { @@ -12772,7 +12774,7 @@ } newElement_0.e = array_2; } - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.f.begin(); while (iter_2.Next()) { @@ -12788,7 +12790,7 @@ } newElement_0.f = array_2; } - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = entry_0.g.begin(); while (iter_2.Next()) { @@ -12815,7 +12817,7 @@ } } { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = data.arg2.begin(); while (iter_0.Next()) { @@ -12827,8 +12829,8 @@ newElement_0.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c)]; newElement_0.d = [NSData dataWithBytes:entry_0.d.data() length:entry_0.d.size()]; newElement_0.e = [[NSString alloc] initWithBytes:entry_0.e.data() - length:entry_0.e.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.e.size() + encoding:NSUTF8StringEncoding]; newElement_0.f = [NSNumber numberWithUnsignedChar:entry_0.f.Raw()]; newElement_0.g = [NSNumber numberWithFloat:entry_0.g]; newElement_0.h = [NSNumber numberWithDouble:entry_0.h]; @@ -12843,7 +12845,7 @@ } } { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = data.arg3.begin(); while (iter_0.Next()) { @@ -12861,7 +12863,7 @@ } } { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = data.arg4.begin(); while (iter_0.Next()) { @@ -12892,7 +12894,7 @@ { auto * response = [MTRTestClusterClusterTestListInt8UReverseResponseParams new]; { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = data.arg1.begin(); while (iter_0.Next()) { @@ -13007,8 +13009,8 @@ { if (data.nullableStringValue.HasValue()) { response.nullableStringValue = [[NSString alloc] initWithBytes:data.nullableStringValue.Value().data() - length:data.nullableStringValue.Value().size() - encoding:NSUTF8StringEncoding]; + length:data.nullableStringValue.Value().size() + encoding:NSUTF8StringEncoding]; } else { response.nullableStringValue = nil; } @@ -13019,8 +13021,8 @@ { if (data.optionalStringValue.HasValue()) { response.optionalStringValue = [[NSString alloc] initWithBytes:data.optionalStringValue.Value().data() - length:data.optionalStringValue.Value().size() - encoding:NSUTF8StringEncoding]; + length:data.optionalStringValue.Value().size() + encoding:NSUTF8StringEncoding]; } else { response.optionalStringValue = nil; } @@ -13038,8 +13040,8 @@ { if (data.nullableOptionalStringValue.HasValue()) { response.nullableOptionalStringValue = [[NSString alloc] initWithBytes:data.nullableOptionalStringValue.Value().data() - length:data.nullableOptionalStringValue.Value().size() - encoding:NSUTF8StringEncoding]; + length:data.nullableOptionalStringValue.Value().size() + encoding:NSUTF8StringEncoding]; } else { response.nullableOptionalStringValue = nil; } @@ -13055,10 +13057,10 @@ response.nullableStructValue.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.nullableStructValue.Value().c)]; response.nullableStructValue.d = [NSData dataWithBytes:data.nullableStructValue.Value().d.data() - length:data.nullableStructValue.Value().d.size()]; + length:data.nullableStructValue.Value().d.size()]; response.nullableStructValue.e = [[NSString alloc] initWithBytes:data.nullableStructValue.Value().e.data() - length:data.nullableStructValue.Value().e.size() - encoding:NSUTF8StringEncoding]; + length:data.nullableStructValue.Value().e.size() + encoding:NSUTF8StringEncoding]; response.nullableStructValue.f = [NSNumber numberWithUnsignedChar:data.nullableStructValue.Value().f.Raw()]; response.nullableStructValue.g = [NSNumber numberWithFloat:data.nullableStructValue.Value().g]; response.nullableStructValue.h = [NSNumber numberWithDouble:data.nullableStructValue.Value().h]; @@ -13077,10 +13079,10 @@ response.optionalStructValue.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.optionalStructValue.Value().c)]; response.optionalStructValue.d = [NSData dataWithBytes:data.optionalStructValue.Value().d.data() - length:data.optionalStructValue.Value().d.size()]; + length:data.optionalStructValue.Value().d.size()]; response.optionalStructValue.e = [[NSString alloc] initWithBytes:data.optionalStructValue.Value().e.data() - length:data.optionalStructValue.Value().e.size() - encoding:NSUTF8StringEncoding]; + length:data.optionalStructValue.Value().e.size() + encoding:NSUTF8StringEncoding]; response.optionalStructValue.f = [NSNumber numberWithUnsignedChar:data.optionalStructValue.Value().f.Raw()]; response.optionalStructValue.g = [NSNumber numberWithFloat:data.optionalStructValue.Value().g]; response.optionalStructValue.h = [NSNumber numberWithDouble:data.optionalStructValue.Value().h]; @@ -13106,11 +13108,11 @@ response.nullableOptionalStructValue.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.nullableOptionalStructValue.Value().c)]; response.nullableOptionalStructValue.d = [NSData dataWithBytes:data.nullableOptionalStructValue.Value().d.data() - length:data.nullableOptionalStructValue.Value().d.size()]; + length:data.nullableOptionalStructValue.Value().d.size()]; response.nullableOptionalStructValue.e = [[NSString alloc] initWithBytes:data.nullableOptionalStructValue.Value().e.data() - length:data.nullableOptionalStructValue.Value().e.size() - encoding:NSUTF8StringEncoding]; + length:data.nullableOptionalStructValue.Value().e.size() + encoding:NSUTF8StringEncoding]; response.nullableOptionalStructValue.f = [NSNumber numberWithUnsignedChar:data.nullableOptionalStructValue.Value().f.Raw()]; response.nullableOptionalStructValue.g = [NSNumber numberWithFloat:data.nullableOptionalStructValue.Value().g]; @@ -13124,7 +13126,7 @@ } { if (data.nullableListValue.HasValue()) { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_1 = [NSMutableArray new]; auto iter_1 = data.nullableListValue.Value().begin(); while (iter_1.Next()) { @@ -13149,7 +13151,7 @@ } { if (data.optionalListValue.HasValue()) { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_1 = [NSMutableArray new]; auto iter_1 = data.optionalListValue.Value().begin(); while (iter_1.Next()) { @@ -13181,7 +13183,7 @@ } { if (data.nullableOptionalListValue.HasValue()) { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_1 = [NSMutableArray new]; auto iter_1 = data.nullableOptionalListValue.Value().begin(); while (iter_1.Next()) { @@ -13225,8 +13227,8 @@ response.arg1.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.arg1.c)]; response.arg1.d = [NSData dataWithBytes:data.arg1.d.data() length:data.arg1.d.size()]; response.arg1.e = [[NSString alloc] initWithBytes:data.arg1.e.data() - length:data.arg1.e.size() - encoding:NSUTF8StringEncoding]; + length:data.arg1.e.size() + encoding:NSUTF8StringEncoding]; response.arg1.f = [NSNumber numberWithUnsignedChar:data.arg1.f.Raw()]; response.arg1.g = [NSNumber numberWithFloat:data.arg1.g]; response.arg1.h = [NSNumber numberWithDouble:data.arg1.h]; @@ -14275,7 +14277,7 @@ } void MTRNullableOtaSoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -14290,7 +14292,7 @@ void * context) { auto * self = static_cast( - context); + context); if (!self->mQueue) { return; } @@ -14330,7 +14332,7 @@ } void MTRNullableOtaSoftwareUpdateProviderClusterOTADownloadProtocolAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -14440,7 +14442,7 @@ } void MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -14452,11 +14454,11 @@ }; void MTRNullableOtaSoftwareUpdateRequestorClusterOTAAnnouncementReasonAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished(void * context) +OnSubscriptionEstablished(void * context) { auto * self = static_cast( - context); + context); if (!self->mQueue) { return; } @@ -14497,7 +14499,7 @@ } void MTRNullableOtaSoftwareUpdateRequestorClusterOTAChangeReasonEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -14512,7 +14514,7 @@ void * context) { auto * self = static_cast( - context); + context); if (!self->mQueue) { return; } @@ -14552,7 +14554,7 @@ } void MTRNullableOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -15291,7 +15293,7 @@ } void MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -15307,7 +15309,7 @@ { auto * self = static_cast( - context); + context); if (!self->mQueue) { return; } @@ -15927,7 +15929,7 @@ } void MTRNullableThreadNetworkDiagnosticsClusterThreadConnectionStatusAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -15943,7 +15945,7 @@ { auto * self = static_cast( - context); + context); if (!self->mQueue) { return; } @@ -15984,7 +15986,7 @@ } void MTRNullableWiFiNetworkDiagnosticsClusterAssociationFailureCauseAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -15999,7 +16001,7 @@ void * context) { auto * self = static_cast( - context); + context); if (!self->mQueue) { return; } @@ -16256,7 +16258,7 @@ } void MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -16268,11 +16270,11 @@ }; void MTRNullableAdministratorCommissioningClusterCommissioningWindowStatusAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished(void * context) +OnSubscriptionEstablished(void * context) { auto * self = static_cast( - context); + context); if (!self->mQueue) { return; } @@ -16365,7 +16367,7 @@ } void MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -17676,7 +17678,7 @@ } void MTRNullablePumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -19146,7 +19148,7 @@ } void MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -19158,11 +19160,11 @@ }; void MTRNullableApplicationLauncherClusterApplicationLauncherStatusEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished(void * context) +OnSubscriptionEstablished(void * context) { auto * self = static_cast( - context); + context); if (!self->mQueue) { return; } @@ -19362,7 +19364,7 @@ } void MTRNullableMessagingClusterMessagingControlEnhancedConfirmationAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -19377,7 +19379,7 @@ void * context) { auto * self = static_cast( - context); + context); if (!self->mQueue) { return; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc.mm index 518abbae399411..cd736a53fcbeb4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClustersObjc.mm @@ -46,7 +46,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::IdentifyCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -76,19 +76,19 @@ - (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completion new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -105,19 +105,19 @@ - (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeIdentifyTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; @@ -132,8 +132,8 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completio [self writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -144,51 +144,51 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeIdentifyTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeIdentifyTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -210,7 +210,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeIdentifyTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; @@ -221,35 +221,35 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeIdentifyTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeIdentifyTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -271,200 +271,200 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRIdentifyGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRIdentifyGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRIdentifyAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRIdentifyAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRIdentifyAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIdentifyAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRIdentifyAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; @@ -475,34 +475,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -524,7 +524,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; @@ -535,36 +535,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -588,7 +588,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -607,7 +607,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::GroupsCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -624,8 +624,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params - completionHandler: - (void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -639,17 +639,17 @@ - (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params request.groupName = [self asCharSpan:params.groupName]; new MTRGroupsClusterAddGroupResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params - completionHandler: - (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -662,17 +662,17 @@ - (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params request.groupId = params.groupId.unsignedShortValue; new MTRGroupsClusterViewGroupResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams *)params - completionHandler:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -706,17 +706,17 @@ - (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams * } new MTRGroupsClusterGetGroupMembershipResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params - completionHandler: - (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -729,12 +729,12 @@ - (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params request.groupId = params.groupId.unsignedShortValue; new MTRGroupsClusterRemoveGroupResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)removeAllGroupsWithCompletionHandler:(StatusCompletion)completionHandler @@ -742,7 +742,7 @@ - (void)removeAllGroupsWithCompletionHandler:(StatusCompletion)completionHandler [self removeAllGroupsWithParams:nil completionHandler:completionHandler]; } - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -755,19 +755,19 @@ - (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Null new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -782,19 +782,19 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeNameSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; @@ -805,35 +805,35 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -855,177 +855,177 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRGroupsGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRGroupsAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupsAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupsAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -1047,7 +1047,7 @@ new MTRGroupsAttributeListListAttributeCallbackBridge(queue, completionHandler, } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; @@ -1058,34 +1058,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -1107,7 +1107,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; @@ -1118,36 +1118,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -1171,7 +1171,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -1190,7 +1190,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::ScenesCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -1207,8 +1207,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params - completionHandler: - (void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1295,17 +1295,17 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params } new MTRScenesClusterAddSceneResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params - completionHandler: - (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1319,17 +1319,17 @@ - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params request.sceneId = params.sceneId.unsignedCharValue; new MTRScenesClusterViewSceneResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params - completionHandler: - (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1343,17 +1343,17 @@ - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params request.sceneId = params.sceneId.unsignedCharValue; new MTRScenesClusterRemoveSceneResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params - completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1366,17 +1366,17 @@ - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)param request.groupId = params.groupId.unsignedShortValue; new MTRScenesClusterRemoveAllScenesResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params - completionHandler: - (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1390,12 +1390,12 @@ - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params request.sceneId = params.sceneId.unsignedCharValue; new MTRScenesClusterStoreSceneResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params completionHandler:(StatusCompletion)completionHandler @@ -1422,20 +1422,20 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params comple new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params - completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1448,17 +1448,17 @@ - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams * request.groupId = params.groupId.unsignedShortValue; new MTRScenesClusterGetSceneMembershipResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params - completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1545,17 +1545,17 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par } new MTRScenesClusterEnhancedAddSceneResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params - completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1569,17 +1569,17 @@ - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)p request.sceneId = params.sceneId.unsignedCharValue; new MTRScenesClusterEnhancedViewSceneResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params - completionHandler: - (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -1596,16 +1596,16 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params request.sceneIdTo = params.sceneIdTo.unsignedCharValue; new MTRScenesClusterCopySceneResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeSceneCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; @@ -1616,34 +1616,34 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSceneCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -1665,7 +1665,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeCurrentSceneWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; @@ -1676,35 +1676,35 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentSceneWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -1726,7 +1726,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeCurrentGroupWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; @@ -1737,35 +1737,35 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentGroupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -1787,7 +1787,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeSceneValidWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; @@ -1798,34 +1798,34 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)subscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSceneValidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -1847,7 +1847,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeNameSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; @@ -1858,35 +1858,35 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -1908,48 +1908,48 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeLastConfiguredByWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeLastConfiguredByWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLastConfiguredByWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -1971,177 +1971,177 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRScenesGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRScenesGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRScenesAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRScenesAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRScenesAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRScenesAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRScenesAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRScenesAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -2163,7 +2163,7 @@ new MTRScenesAttributeListListAttributeCallbackBridge(queue, completionHandler, } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; @@ -2174,34 +2174,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -2223,7 +2223,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; @@ -2234,36 +2234,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -2287,7 +2287,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -2306,7 +2306,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::OnOffCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -2339,15 +2339,15 @@ - (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completionHan new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)onWithCompletionHandler:(StatusCompletion)completionHandler @@ -2367,15 +2367,15 @@ - (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completionHandl new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)toggleWithCompletionHandler:(StatusCompletion)completionHandler @@ -2395,15 +2395,15 @@ - (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params complet new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params completionHandler:(StatusCompletion)completionHandler @@ -2422,15 +2422,15 @@ - (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params com new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)onWithRecallGlobalSceneWithCompletionHandler:(StatusCompletion)completionHandler @@ -2438,7 +2438,7 @@ - (void)onWithRecallGlobalSceneWithCompletionHandler:(StatusCompletion)completio [self onWithRecallGlobalSceneWithParams:nil completionHandler:completionHandler]; } - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -2451,15 +2451,15 @@ - (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalScen new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params completionHandler:(StatusCompletion)completionHandler @@ -2479,15 +2479,15 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params c new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler @@ -2501,34 +2501,34 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)subscribeAttributeOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -2550,7 +2550,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeGlobalSceneControlWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; @@ -2561,36 +2561,36 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)subscribeAttributeGlobalSceneControlWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGlobalSceneControlWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -2626,8 +2626,8 @@ - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeOnTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -2638,50 +2638,50 @@ - (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOnTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOnTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -2703,7 +2703,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeOffWaitTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; @@ -2718,8 +2718,8 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completion [self writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -2730,51 +2730,51 @@ - (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOffWaitTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOffWaitTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -2796,15 +2796,15 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeStartUpOnOffWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -2812,8 +2812,8 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completi [self writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -2824,249 +2824,249 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeStartUpOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTROnOffGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROnOffGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTROnOffAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROnOffAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROnOffAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROnOffAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROnOffAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -3088,7 +3088,7 @@ new MTROnOffAttributeListListAttributeCallbackBridge(queue, completionHandler, ^ } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; @@ -3099,34 +3099,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -3148,7 +3148,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; @@ -3159,36 +3159,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -3212,7 +3212,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -3231,7 +3231,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::OnOffSwitchConfigurationCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -3248,7 +3248,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; @@ -3259,34 +3259,34 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSwitchTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -3308,7 +3308,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeSwitchActionsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; @@ -3323,8 +3323,8 @@ - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completi [self writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -3335,52 +3335,52 @@ - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSwitchActionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -3402,202 +3402,202 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; @@ -3608,34 +3608,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -3657,7 +3657,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; @@ -3668,36 +3668,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -3721,7 +3721,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -3740,7 +3740,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::LevelControlCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -3757,7 +3757,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -3774,15 +3774,15 @@ - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completionHandler:(StatusCompletion)completionHandler @@ -3802,15 +3802,15 @@ - (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completionHand new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completionHandler:(StatusCompletion)completionHandler @@ -3831,15 +3831,15 @@ - (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completionHand new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completionHandler:(StatusCompletion)completionHandler @@ -3857,19 +3857,19 @@ - (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completionHand new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -3884,19 +3884,19 @@ - (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnO new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -3911,19 +3911,19 @@ - (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)par new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -3939,15 +3939,15 @@ - (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)par new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)stopWithOnOffWithCompletionHandler:(StatusCompletion)completionHandler @@ -3955,7 +3955,7 @@ - (void)stopWithOnOffWithCompletionHandler:(StatusCompletion)completionHandler [self stopWithOnOffWithParams:nil completionHandler:completionHandler]; } - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -3968,19 +3968,19 @@ - (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams * _Nu new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -3994,19 +3994,19 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeCurrentLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; @@ -4017,35 +4017,35 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -4067,7 +4067,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; @@ -4078,36 +4078,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -4129,7 +4129,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMinLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; @@ -4140,34 +4140,34 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -4189,7 +4189,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; @@ -4200,34 +4200,34 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -4249,7 +4249,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeCurrentFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; @@ -4260,36 +4260,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeCurrentFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -4311,7 +4311,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMinFrequencyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; @@ -4322,35 +4322,35 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMinFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -4372,7 +4372,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMaxFrequencyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; @@ -4383,35 +4383,35 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMaxFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -4447,8 +4447,8 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHand [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -4459,50 +4459,50 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::Options::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::Options::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::Options::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::Options::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -4524,7 +4524,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeOnOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; @@ -4539,8 +4539,8 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value co [self writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -4551,53 +4551,53 @@ - (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOnOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOnOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -4621,12 +4621,12 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)readAttributeOnLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -4634,8 +4634,8 @@ - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHan [self writeAttributeOnLevelWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -4646,55 +4646,55 @@ - (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOnLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOnLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -4716,15 +4716,15 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeOnTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -4732,8 +4732,8 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value comp [self writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -4744,57 +4744,57 @@ - (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOnTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOnTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -4816,15 +4816,15 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -4832,8 +4832,8 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value com [self writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -4844,57 +4844,57 @@ - (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -4916,15 +4916,15 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeDefaultMoveRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -4932,8 +4932,8 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value compl [self writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -4944,57 +4944,57 @@ - (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeDefaultMoveRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDefaultMoveRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -5016,15 +5016,15 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -5032,8 +5032,8 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value c [self writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -5044,58 +5044,58 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeStartUpCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -5117,200 +5117,200 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRLevelControlGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLevelControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRLevelControlAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLevelControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLevelControlAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLevelControlAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; @@ -5321,34 +5321,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -5370,7 +5370,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; @@ -5381,36 +5381,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -5434,7 +5434,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -5453,7 +5453,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::BinaryInputBasicCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -5470,7 +5470,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeActiveTextWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; @@ -5485,8 +5485,8 @@ - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completionH [self writeAttributeActiveTextWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -5497,50 +5497,50 @@ - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeActiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -5562,7 +5562,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeDescriptionWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; @@ -5577,8 +5577,8 @@ - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completion [self writeAttributeDescriptionWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -5589,51 +5589,51 @@ - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -5655,7 +5655,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeInactiveTextWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; @@ -5670,8 +5670,8 @@ - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completio [self writeAttributeInactiveTextWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -5682,51 +5682,51 @@ - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInactiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -5748,7 +5748,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeOutOfServiceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; @@ -5763,8 +5763,8 @@ - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completio [self writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -5775,51 +5775,51 @@ - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOutOfServiceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOutOfServiceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -5841,7 +5841,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributePolarityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; @@ -5852,34 +5852,34 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePolarityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -5901,7 +5901,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributePresentValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; @@ -5916,8 +5916,8 @@ - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completio [self writeAttributePresentValueWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -5928,51 +5928,51 @@ - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePresentValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -5994,7 +5994,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeReliabilityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; @@ -6009,8 +6009,8 @@ - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completion [self writeAttributeReliabilityWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -6021,51 +6021,51 @@ - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeReliabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeReliabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -6087,7 +6087,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeStatusFlagsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; @@ -6098,35 +6098,35 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeStatusFlagsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeStatusFlagsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -6148,7 +6148,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeApplicationTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; @@ -6159,36 +6159,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeApplicationTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeApplicationTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -6210,200 +6210,200 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBinaryInputBasicAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBinaryInputBasicAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; @@ -6414,34 +6414,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -6463,7 +6463,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; @@ -6474,36 +6474,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -6527,7 +6527,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -6546,7 +6546,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::DescriptorCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -6563,46 +6563,46 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeDeviceListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDescriptorDeviceListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Descriptor::Attributes::DeviceList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Descriptor::Attributes::DeviceList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeDeviceListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDescriptorDeviceListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::DeviceList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Descriptor::Attributes::DeviceList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorDeviceListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDeviceListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDescriptorDeviceListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -6624,46 +6624,46 @@ new MTRDescriptorDeviceListListAttributeCallbackBridge(queue, completionHandler, } - (void)readAttributeServerListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDescriptorServerListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeServerListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDescriptorServerListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorServerListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeServerListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDescriptorServerListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -6685,46 +6685,46 @@ new MTRDescriptorServerListListAttributeCallbackBridge(queue, completionHandler, } - (void)readAttributeClientListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDescriptorClientListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDescriptorClientListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorClientListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClientListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDescriptorClientListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -6746,46 +6746,46 @@ new MTRDescriptorClientListListAttributeCallbackBridge(queue, completionHandler, } - (void)readAttributePartsListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDescriptorPartsListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePartsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDescriptorPartsListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -6807,200 +6807,200 @@ new MTRDescriptorPartsListListAttributeCallbackBridge(queue, completionHandler, } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRDescriptorGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDescriptorGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRDescriptorAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDescriptorAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDescriptorAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDescriptorAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; @@ -7011,34 +7011,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -7060,7 +7060,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; @@ -7071,36 +7071,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -7124,7 +7124,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -7143,7 +7143,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::BindingCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -7160,16 +7160,16 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBindingBindingListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Binding::Attributes::Binding::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Binding::Attributes::Binding::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); + }); } - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -7177,8 +7177,8 @@ - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completionHandl [self writeAttributeBindingWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -7189,87 +7189,87 @@ - (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Binding::Attributes::Binding::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Binding::Attributes::Binding::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRBindingClusterTargetStruct class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRBindingClusterTargetStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRBindingClusterTargetStruct *) value[i_0]; - if (element_0.node != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].node.Emplace(); - definedValue_2 = element_0.node.unsignedLongLongValue; - } - if (element_0.group != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].group.Emplace(); - definedValue_2 = element_0.group.unsignedShortValue; - } - if (element_0.endpoint != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].endpoint.Emplace(); - definedValue_2 = element_0.endpoint.unsignedShortValue; - } - if (element_0.cluster != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].cluster.Emplace(); - definedValue_2 = element_0.cluster.unsignedIntValue; - } - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + auto element_0 = (MTRBindingClusterTargetStruct *) value[i_0]; + if (element_0.node != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].node.Emplace(); + definedValue_2 = element_0.node.unsignedLongLongValue; } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + if (element_0.group != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].group.Emplace(); + definedValue_2 = element_0.group.unsignedShortValue; + } + if (element_0.endpoint != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].endpoint.Emplace(); + definedValue_2 = element_0.endpoint.unsignedShortValue; + } + if (element_0.cluster != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].cluster.Emplace(); + definedValue_2 = element_0.cluster.unsignedIntValue; + } + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeBindingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBindingBindingListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Binding::Attributes::Binding::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Binding::Attributes::Binding::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBindingBindingListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBindingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBindingBindingListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -7291,177 +7291,177 @@ new MTRBindingBindingListAttributeCallbackBridge(queue, completionHandler, ^(Can } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBindingGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBindingGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBindingAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBindingAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBindingAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBindingAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBindingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBindingAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -7483,7 +7483,7 @@ new MTRBindingAttributeListListAttributeCallbackBridge(queue, completionHandler, } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; @@ -7494,34 +7494,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -7543,7 +7543,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; @@ -7554,36 +7554,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -7607,7 +7607,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -7626,7 +7626,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::AccessControlCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -7643,16 +7643,16 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeAclWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAccessControlAclListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); + }); } - (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -7660,8 +7660,8 @@ - (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value completionHandler:( [self writeAttributeAclWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -7672,148 +7672,148 @@ - (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRAccessControlClusterAccessControlEntry class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRAccessControlClusterAccessControlEntry class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRAccessControlClusterAccessControlEntry *) value[i_0]; - listHolder_0->mList[i_0].privilege - = static_castmList[i_0].privilege)>>( - element_0.privilege.unsignedCharValue); - listHolder_0->mList[i_0].authMode - = static_castmList[i_0].authMode)>>( - element_0.authMode.unsignedCharValue); - if (element_0.subjects == nil) { - listHolder_0->mList[i_0].subjects.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].subjects.SetNonNull(); - { - using ListType_3 = std::remove_reference_t; - using ListMemberType_3 = ListMemberTypeGetter::Type; - if (element_0.subjects.count != 0) { - auto * listHolder_3 = new ListHolder(element_0.subjects.count); - if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { + auto element_0 = (MTRAccessControlClusterAccessControlEntry *) value[i_0]; + listHolder_0->mList[i_0].privilege + = static_castmList[i_0].privilege)>>( + element_0.privilege.unsignedCharValue); + listHolder_0->mList[i_0].authMode + = static_castmList[i_0].authMode)>>( + element_0.authMode.unsignedCharValue); + if (element_0.subjects == nil) { + listHolder_0->mList[i_0].subjects.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].subjects.SetNonNull(); + { + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; + if (element_0.subjects.count != 0) { + auto * listHolder_3 = new ListHolder(element_0.subjects.count); + if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_3); + for (size_t i_3 = 0; i_3 < element_0.subjects.count; ++i_3) { + if (![element_0.subjects[i_3] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_3); - for (size_t i_3 = 0; i_3 < element_0.subjects.count; ++i_3) { - if (![element_0.subjects[i_3] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_3 = (NSNumber *) element_0.subjects[i_3]; - listHolder_3->mList[i_3] = element_3.unsignedLongLongValue; - } - nonNullValue_2 = ListType_3(listHolder_3->mList, element_0.subjects.count); - } else { - nonNullValue_2 = ListType_3(); + auto element_3 = (NSNumber *) element_0.subjects[i_3]; + listHolder_3->mList[i_3] = element_3.unsignedLongLongValue; } + nonNullValue_2 = ListType_3(listHolder_3->mList, element_0.subjects.count); + } else { + nonNullValue_2 = ListType_3(); } } - if (element_0.targets == nil) { - listHolder_0->mList[i_0].targets.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].targets.SetNonNull(); - { - using ListType_3 = std::remove_reference_t; - using ListMemberType_3 = ListMemberTypeGetter::Type; - if (element_0.targets.count != 0) { - auto * listHolder_3 = new ListHolder(element_0.targets.count); - if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { + } + if (element_0.targets == nil) { + listHolder_0->mList[i_0].targets.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].targets.SetNonNull(); + { + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; + if (element_0.targets.count != 0) { + auto * listHolder_3 = new ListHolder(element_0.targets.count); + if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_3); + for (size_t i_3 = 0; i_3 < element_0.targets.count; ++i_3) { + if (![element_0.targets[i_3] isKindOfClass:[MTRAccessControlClusterTarget class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_3); - for (size_t i_3 = 0; i_3 < element_0.targets.count; ++i_3) { - if (![element_0.targets[i_3] isKindOfClass:[MTRAccessControlClusterTarget class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_3 = (MTRAccessControlClusterTarget *) element_0.targets[i_3]; - if (element_3.cluster == nil) { - listHolder_3->mList[i_3].cluster.SetNull(); - } else { - auto & nonNullValue_5 = listHolder_3->mList[i_3].cluster.SetNonNull(); - nonNullValue_5 = element_3.cluster.unsignedIntValue; - } - if (element_3.endpoint == nil) { - listHolder_3->mList[i_3].endpoint.SetNull(); - } else { - auto & nonNullValue_5 = listHolder_3->mList[i_3].endpoint.SetNonNull(); - nonNullValue_5 = element_3.endpoint.unsignedShortValue; - } - if (element_3.deviceType == nil) { - listHolder_3->mList[i_3].deviceType.SetNull(); - } else { - auto & nonNullValue_5 = listHolder_3->mList[i_3].deviceType.SetNonNull(); - nonNullValue_5 = element_3.deviceType.unsignedIntValue; - } + auto element_3 = (MTRAccessControlClusterTarget *) element_0.targets[i_3]; + if (element_3.cluster == nil) { + listHolder_3->mList[i_3].cluster.SetNull(); + } else { + auto & nonNullValue_5 = listHolder_3->mList[i_3].cluster.SetNonNull(); + nonNullValue_5 = element_3.cluster.unsignedIntValue; + } + if (element_3.endpoint == nil) { + listHolder_3->mList[i_3].endpoint.SetNull(); + } else { + auto & nonNullValue_5 = listHolder_3->mList[i_3].endpoint.SetNonNull(); + nonNullValue_5 = element_3.endpoint.unsignedShortValue; + } + if (element_3.deviceType == nil) { + listHolder_3->mList[i_3].deviceType.SetNull(); + } else { + auto & nonNullValue_5 = listHolder_3->mList[i_3].deviceType.SetNonNull(); + nonNullValue_5 = element_3.deviceType.unsignedIntValue; } - nonNullValue_2 = ListType_3(listHolder_3->mList, element_0.targets.count); - } else { - nonNullValue_2 = ListType_3(); } + nonNullValue_2 = ListType_3(listHolder_3->mList, element_0.targets.count); + } else { + nonNullValue_2 = ListType_3(); } } - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeAclWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRAccessControlAclListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccessControlAclListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAclWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAccessControlAclListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -7835,16 +7835,16 @@ new MTRAccessControlAclListAttributeCallbackBridge(queue, completionHandler, ^(C } - (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAccessControlExtensionListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); + }); } - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -7852,8 +7852,8 @@ - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completionHan [self writeAttributeExtensionWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -7864,95 +7864,95 @@ - (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRAccessControlClusterExtensionEntry class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRAccessControlClusterExtensionEntry class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRAccessControlClusterExtensionEntry *) value[i_0]; - listHolder_0->mList[i_0].data = [self asByteSpan:element_0.data]; - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (MTRAccessControlClusterExtensionEntry *) value[i_0]; + listHolder_0->mList[i_0].data = [self asByteSpan:element_0.data]; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeExtensionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeExtensionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAccessControlExtensionListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeSubjectsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; @@ -7963,37 +7963,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSubjectsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -8015,7 +8015,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTargetsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; @@ -8026,37 +8026,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTargetsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTargetsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -8078,7 +8078,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAccessControlEntriesPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; @@ -8089,37 +8089,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAccessControlEntriesPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAccessControlEntriesPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -8141,200 +8141,200 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRAccessControlGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAccessControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRAccessControlAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAccessControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAccessControlAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAccessControlAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; @@ -8345,34 +8345,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -8394,7 +8394,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; @@ -8405,36 +8405,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -8458,7 +8458,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -8477,7 +8477,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::BridgedActionsCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -8494,7 +8494,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)instantActionWithParams:(MTRBridgedActionsClusterInstantActionParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8512,19 +8512,19 @@ - (void)instantActionWithParams:(MTRBridgedActionsClusterInstantActionParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)instantActionWithTransitionWithParams:(MTRBridgedActionsClusterInstantActionWithTransitionParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8543,19 +8543,19 @@ - (void)instantActionWithTransitionWithParams:(MTRBridgedActionsClusterInstantAc new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)startActionWithParams:(MTRBridgedActionsClusterStartActionParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8573,19 +8573,19 @@ - (void)startActionWithParams:(MTRBridgedActionsClusterStartActionParams *)param new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)startActionWithDurationWithParams:(MTRBridgedActionsClusterStartActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8604,19 +8604,19 @@ - (void)startActionWithDurationWithParams:(MTRBridgedActionsClusterStartActionWi new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)stopActionWithParams:(MTRBridgedActionsClusterStopActionParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8634,19 +8634,19 @@ - (void)stopActionWithParams:(MTRBridgedActionsClusterStopActionParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)pauseActionWithParams:(MTRBridgedActionsClusterPauseActionParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8664,19 +8664,19 @@ - (void)pauseActionWithParams:(MTRBridgedActionsClusterPauseActionParams *)param new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)pauseActionWithDurationWithParams:(MTRBridgedActionsClusterPauseActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8695,19 +8695,19 @@ - (void)pauseActionWithDurationWithParams:(MTRBridgedActionsClusterPauseActionWi new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)resumeActionWithParams:(MTRBridgedActionsClusterResumeActionParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8725,19 +8725,19 @@ - (void)resumeActionWithParams:(MTRBridgedActionsClusterResumeActionParams *)par new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)enableActionWithParams:(MTRBridgedActionsClusterEnableActionParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8755,19 +8755,19 @@ - (void)enableActionWithParams:(MTRBridgedActionsClusterEnableActionParams *)par new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)enableActionWithDurationWithParams:(MTRBridgedActionsClusterEnableActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8786,19 +8786,19 @@ - (void)enableActionWithDurationWithParams:(MTRBridgedActionsClusterEnableAction new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)disableActionWithParams:(MTRBridgedActionsClusterDisableActionParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8816,19 +8816,19 @@ - (void)disableActionWithParams:(MTRBridgedActionsClusterDisableActionParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)disableActionWithDurationWithParams:(MTRBridgedActionsClusterDisableActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -8847,144 +8847,144 @@ - (void)disableActionWithDurationWithParams:(MTRBridgedActionsClusterDisableActi new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeActionListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBridgedActionsActionListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedActions::Attributes::ActionList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedActions::Attributes::ActionList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBridgedActionsActionListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedActions::Attributes::ActionList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedActions::Attributes::ActionList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedActionsActionListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActionListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBridgedActionsActionListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedActions::Attributes::ActionList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedActions::Attributes::ActionList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeEndpointListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBridgedActionsEndpointListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedActions::Attributes::EndpointList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedActions::Attributes::EndpointList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeEndpointListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBridgedActionsEndpointListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedActions::Attributes::EndpointList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedActions::Attributes::EndpointList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedActionsEndpointListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeEndpointListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBridgedActionsEndpointListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedActions::Attributes::EndpointList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedActions::Attributes::EndpointList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeSetupUrlWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedActions::Attributes::SetupUrl::TypeInfo; @@ -8995,34 +8995,34 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeSetupUrlWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedActions::Attributes::SetupUrl::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedActions::Attributes::SetupUrl::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSetupUrlWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -9044,200 +9044,200 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBridgedActionsGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedActions::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedActions::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBridgedActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedActions::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedActions::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBridgedActionsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedActions::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedActions::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBridgedActionsAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedActions::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedActions::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBridgedActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedActions::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedActions::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBridgedActionsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedActions::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedActions::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBridgedActionsAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBridgedActionsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedActionsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBridgedActionsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedActions::Attributes::FeatureMap::TypeInfo; @@ -9248,34 +9248,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedActions::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedActions::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -9297,7 +9297,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedActions::Attributes::ClusterRevision::TypeInfo; @@ -9308,36 +9308,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedActions::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedActions::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -9361,7 +9361,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -9380,7 +9380,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::BasicCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -9401,7 +9401,7 @@ - (void)mfgSpecificPingWithCompletionHandler:(StatusCompletion)completionHandler [self mfgSpecificPingWithParams:nil completionHandler:completionHandler]; } - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -9414,19 +9414,19 @@ - (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nulla new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeDataModelRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; @@ -9437,36 +9437,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDataModelRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -9488,7 +9488,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeVendorNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::VendorName::TypeInfo; @@ -9499,34 +9499,34 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::VendorName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::VendorName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -9548,7 +9548,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeVendorIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::VendorID::TypeInfo; @@ -9559,34 +9559,34 @@ new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, completionHandler, ^( } - (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRVendorIdAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::VendorID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::VendorID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -9608,7 +9608,7 @@ new MTRVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * } - (void)readAttributeProductNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ProductName::TypeInfo; @@ -9619,35 +9619,35 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::ProductName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::ProductName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -9669,7 +9669,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeProductIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ProductID::TypeInfo; @@ -9680,34 +9680,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::ProductID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::ProductID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -9729,7 +9729,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; @@ -9744,8 +9744,8 @@ - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHa [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -9756,50 +9756,50 @@ - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -9821,7 +9821,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeLocationWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::Location::TypeInfo; @@ -9836,8 +9836,8 @@ - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completionHan [self writeAttributeLocationWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -9848,50 +9848,50 @@ - (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::Location::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::Location::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::Location::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::Location::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLocationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -9913,7 +9913,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; @@ -9924,36 +9924,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -9975,7 +9975,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; @@ -9986,37 +9986,37 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -10038,7 +10038,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; @@ -10049,36 +10049,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -10100,7 +10100,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; @@ -10111,37 +10111,37 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -10163,7 +10163,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; @@ -10174,36 +10174,36 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -10225,7 +10225,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributePartNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; @@ -10236,34 +10236,34 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -10285,7 +10285,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeProductURLWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; @@ -10296,34 +10296,34 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -10345,7 +10345,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeProductLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; @@ -10356,35 +10356,35 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -10406,7 +10406,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; @@ -10417,35 +10417,35 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -10467,7 +10467,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeLocalConfigDisabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; @@ -10482,8 +10482,8 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value co [self writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -10494,53 +10494,53 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeLocalConfigDisabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLocalConfigDisabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -10562,7 +10562,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeReachableWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::Reachable::TypeInfo; @@ -10573,34 +10573,34 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::Reachable::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::Reachable::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -10622,7 +10622,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; @@ -10633,34 +10633,34 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -10682,241 +10682,241 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeCapabilityMinimaWithCompletionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBasicCapabilityMinimaStructAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCapabilityMinimaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRBasicCapabilityMinimaStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBasicGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBasicGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBasicAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBasicAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBasicAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBasicAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBasicAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -10938,7 +10938,7 @@ new MTRBasicAttributeListListAttributeCallbackBridge(queue, completionHandler, ^ } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; @@ -10949,34 +10949,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -10998,7 +10998,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; @@ -11009,36 +11009,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -11062,7 +11062,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -11081,7 +11081,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::OtaSoftwareUpdateProviderCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -11098,8 +11098,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params - completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -11153,17 +11153,17 @@ - (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParam } new MTROtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params - completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -11177,16 +11177,16 @@ - (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUp request.newVersion = params.newVersion.unsignedIntValue; new MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -11201,214 +11201,214 @@ - (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotify new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; @@ -11419,34 +11419,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -11468,7 +11468,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; @@ -11479,36 +11479,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -11532,7 +11532,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -11551,7 +11551,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::OtaSoftwareUpdateRequestorCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -11568,7 +11568,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -11590,28 +11590,28 @@ - (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnou new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); + }); } - (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -11619,8 +11619,8 @@ - (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value com [self writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -11631,100 +11631,100 @@ - (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTROtaSoftwareUpdateRequestorClusterProviderLocation class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTROtaSoftwareUpdateRequestorClusterProviderLocation class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTROtaSoftwareUpdateRequestorClusterProviderLocation *) value[i_0]; - listHolder_0->mList[i_0].providerNodeID = element_0.providerNodeID.unsignedLongLongValue; - listHolder_0->mList[i_0].endpoint = element_0.endpoint.unsignedShortValue; - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (MTROtaSoftwareUpdateRequestorClusterProviderLocation *) value[i_0]; + listHolder_0->mList[i_0].providerNodeID = element_0.providerNodeID.unsignedLongLongValue; + listHolder_0->mList[i_0].endpoint = element_0.endpoint.unsignedShortValue; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeUpdatePossibleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; @@ -11735,36 +11735,36 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)subscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -11786,116 +11786,116 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeUpdateStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTROtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeUpdateStateProgressWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -11917,202 +11917,202 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; @@ -12123,34 +12123,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -12172,7 +12172,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; @@ -12183,36 +12183,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -12236,7 +12236,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -12255,7 +12255,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::LocalizationConfigurationCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -12272,7 +12272,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; @@ -12287,8 +12287,8 @@ - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completio [self writeAttributeActiveLocaleWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -12299,51 +12299,51 @@ - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -12365,266 +12365,266 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; @@ -12635,34 +12635,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -12684,7 +12684,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; @@ -12695,36 +12695,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -12748,7 +12748,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -12767,7 +12767,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::TimeFormatLocalizationCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -12784,15 +12784,15 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeHourFormatWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -12800,8 +12800,8 @@ - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completionH [self writeAttributeHourFormatWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -12812,81 +12812,81 @@ - (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeHourFormatWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationClusterHourFormatAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeActiveCalendarTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -12894,8 +12894,8 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value com [self writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -12906,334 +12906,334 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeActiveCalendarTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationClusterCalendarTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeSupportedCalendarTypesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeSupportedCalendarTypesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; @@ -13244,34 +13244,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -13293,7 +13293,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; @@ -13304,36 +13304,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -13357,7 +13357,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -13376,7 +13376,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::UnitLocalizationCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -13393,15 +13393,15 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeTemperatureUnitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -13409,8 +13409,8 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value comple [self writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -13421,268 +13421,268 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeTemperatureUnitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUnitLocalizationClusterTempUnitAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRUnitLocalizationClusterTempUnitAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRUnitLocalizationAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRUnitLocalizationAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; @@ -13693,34 +13693,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -13742,7 +13742,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; @@ -13753,36 +13753,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -13806,7 +13806,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -13825,7 +13825,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::PowerSourceConfigurationCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -13844,261 +13844,261 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q - (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; @@ -14109,34 +14109,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -14158,7 +14158,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; @@ -14169,36 +14169,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -14222,7 +14222,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -14241,7 +14241,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::PowerSourceCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -14268,34 +14268,34 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::Status::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -14327,34 +14327,34 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::Order::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -14376,7 +14376,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeDescriptionWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::Description::TypeInfo; @@ -14387,35 +14387,35 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::Description::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::Description::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -14437,7 +14437,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; @@ -14448,37 +14448,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -14500,7 +14500,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeWiredAssessedInputFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; @@ -14511,37 +14511,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -14563,7 +14563,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeWiredCurrentTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; @@ -14574,36 +14574,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -14625,7 +14625,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeWiredAssessedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; @@ -14636,37 +14636,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -14688,7 +14688,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeWiredNominalVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; @@ -14699,37 +14699,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -14751,7 +14751,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeWiredMaximumCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; @@ -14762,37 +14762,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -14814,7 +14814,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeWiredPresentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; @@ -14825,35 +14825,35 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -14875,71 +14875,71 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeActiveWiredFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeBatteryVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryVoltage::TypeInfo; @@ -14950,36 +14950,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeBatteryVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -15001,7 +15001,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeBatteryPercentRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryPercentRemaining::TypeInfo; @@ -15012,37 +15012,37 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeBatteryPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryPercentRemaining::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryPercentRemaining::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryPercentRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -15064,7 +15064,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeBatteryTimeRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryTimeRemaining::TypeInfo; @@ -15075,37 +15075,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeBatteryTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryTimeRemaining::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryTimeRemaining::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryTimeRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -15127,7 +15127,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeBatteryChargeLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryChargeLevel::TypeInfo; @@ -15138,36 +15138,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeBatteryChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryChargeLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryChargeLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryChargeLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -15189,7 +15189,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeBatteryReplacementNeededWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryReplacementNeeded::TypeInfo; @@ -15200,37 +15200,37 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)subscribeAttributeBatteryReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryReplacementNeeded::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryReplacementNeeded::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryReplacementNeededWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -15252,7 +15252,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeBatteryReplaceabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryReplaceability::TypeInfo; @@ -15263,37 +15263,37 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeBatteryReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryReplaceability::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryReplaceability::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryReplaceabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -15315,7 +15315,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeBatteryPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryPresent::TypeInfo; @@ -15326,36 +15326,36 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)subscribeAttributeBatteryPresentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryPresent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryPresent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -15377,72 +15377,72 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeActiveBatteryFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRPowerSourceActiveBatteryFaultsListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::ActiveBatteryFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::ActiveBatteryFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeActiveBatteryFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPowerSourceActiveBatteryFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::ActiveBatteryFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::ActiveBatteryFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceActiveBatteryFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActiveBatteryFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceActiveBatteryFaultsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::ActiveBatteryFaults::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::ActiveBatteryFaults::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeBatteryReplacementDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryReplacementDescription::TypeInfo; @@ -15453,37 +15453,37 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeBatteryReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryReplacementDescription::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryReplacementDescription::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryReplacementDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -15505,7 +15505,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeBatteryCommonDesignationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryCommonDesignation::TypeInfo; @@ -15516,37 +15516,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeBatteryCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryCommonDesignation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryCommonDesignation::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryCommonDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -15568,7 +15568,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeBatteryANSIDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryANSIDesignation::TypeInfo; @@ -15579,37 +15579,37 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeBatteryANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryANSIDesignation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryANSIDesignation::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryANSIDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -15631,7 +15631,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeBatteryIECDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryIECDesignation::TypeInfo; @@ -15642,37 +15642,37 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeBatteryIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryIECDesignation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryIECDesignation::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryIECDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -15694,7 +15694,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeBatteryApprovedChemistryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryApprovedChemistry::TypeInfo; @@ -15705,37 +15705,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeBatteryApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryApprovedChemistry::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryApprovedChemistry::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryApprovedChemistryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -15757,7 +15757,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeBatteryCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryCapacity::TypeInfo; @@ -15768,36 +15768,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeBatteryCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryCapacity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryCapacity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -15819,7 +15819,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeBatteryQuantityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryQuantity::TypeInfo; @@ -15830,36 +15830,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeBatteryQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryQuantity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryQuantity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -15881,7 +15881,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeBatteryChargeStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryChargeState::TypeInfo; @@ -15892,36 +15892,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeBatteryChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryChargeState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryChargeState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryChargeStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -15943,7 +15943,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeBatteryTimeToFullChargeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryTimeToFullCharge::TypeInfo; @@ -15954,37 +15954,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeBatteryTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryTimeToFullCharge::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryTimeToFullCharge::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryTimeToFullChargeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -16006,7 +16006,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeBatteryFunctionalWhileChargingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryFunctionalWhileCharging::TypeInfo; @@ -16017,37 +16017,37 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)subscribeAttributeBatteryFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryFunctionalWhileCharging::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryFunctionalWhileCharging::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryFunctionalWhileChargingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -16069,7 +16069,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeBatteryChargingCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::BatteryChargingCurrent::TypeInfo; @@ -16080,37 +16080,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeBatteryChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::BatteryChargingCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryChargingCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBatteryChargingCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -16132,265 +16132,265 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeActiveBatteryChargeFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRPowerSourceActiveBatteryChargeFaultsListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::ActiveBatteryChargeFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::ActiveBatteryChargeFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeActiveBatteryChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRPowerSourceActiveBatteryChargeFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::ActiveBatteryChargeFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::ActiveBatteryChargeFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceActiveBatteryChargeFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActiveBatteryChargeFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceActiveBatteryChargeFaultsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::ActiveBatteryChargeFaults::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::ActiveBatteryChargeFaults::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPowerSourceAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; @@ -16401,34 +16401,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -16450,7 +16450,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; @@ -16461,36 +16461,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -16514,7 +16514,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -16533,7 +16533,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::GeneralCommissioningCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -16550,8 +16550,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params - completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -16565,17 +16565,17 @@ - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams * request.breadcrumb = params.breadcrumb.unsignedLongLongValue; new MTRGeneralCommissioningClusterArmFailSafeResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params - completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -16591,24 +16591,24 @@ - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulato request.breadcrumb = params.breadcrumb.unsignedLongLongValue; new MTRGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)commissioningCompleteWithCompletionHandler: (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { [self commissioningCompleteWithParams:nil completionHandler:completionHandler]; } - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params - completionHandler: - (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -16620,17 +16620,17 @@ - (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissio } new MTRGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeBreadcrumbWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; @@ -16645,8 +16645,8 @@ - (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completionH [self writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -16657,50 +16657,50 @@ - (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -16725,202 +16725,202 @@ - (void)readAttributeBasicCommissioningInfoWithCompletionHandler: (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void) subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; @@ -16931,37 +16931,37 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -16983,200 +16983,200 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralCommissioningAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; @@ -17187,34 +17187,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -17236,7 +17236,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; @@ -17247,36 +17247,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -17300,7 +17300,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -17319,7 +17319,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::NetworkCommissioningCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -17336,8 +17336,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -17364,17 +17364,17 @@ - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams } new MTRNetworkCommissioningClusterScanNetworksResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -17392,17 +17392,17 @@ - (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpd } new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -17419,17 +17419,17 @@ - (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrU } new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -17446,17 +17446,17 @@ - (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkPara } new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -17473,17 +17473,17 @@ - (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkPa } new MTRNetworkCommissioningClusterConnectNetworkResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params - completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -17501,16 +17501,16 @@ - (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkPa } new MTRNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; @@ -17521,35 +17521,35 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -17573,66 +17573,66 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc - (void)readAttributeNetworksWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNetworkCommissioningNetworksListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNetworkCommissioningNetworksListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; @@ -17643,36 +17643,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -17694,7 +17694,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; @@ -17705,37 +17705,37 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -17757,7 +17757,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; @@ -17772,8 +17772,8 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value compl [self writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -17784,52 +17784,52 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -17851,117 +17851,117 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable( - success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable( + success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler + NSData * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableOctetStringAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -17983,49 +17983,49 @@ new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Ca } - (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt32sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -18047,200 +18047,200 @@ new MTRNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNetworkCommissioningAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNetworkCommissioningAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; @@ -18251,34 +18251,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -18300,7 +18300,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; @@ -18311,36 +18311,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -18364,7 +18364,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -18383,7 +18383,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::DiagnosticLogsCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -18400,8 +18400,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params - completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18417,209 +18417,209 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque request.transferFileDesignator = [self asByteSpan:params.transferFileDesignator]; new MTRDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDiagnosticLogsAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDiagnosticLogsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; @@ -18630,34 +18630,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -18679,7 +18679,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; @@ -18690,36 +18690,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -18743,7 +18743,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -18762,7 +18762,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::GeneralDiagnosticsCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -18779,7 +18779,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -18794,83 +18794,83 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNetworkInterfacesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeRebootCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; @@ -18881,35 +18881,35 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -18941,34 +18941,34 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeUpTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -18990,7 +18990,7 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTotalOperationalHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; @@ -19001,37 +19001,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -19053,7 +19053,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeBootReasonsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; @@ -19064,35 +19064,35 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -19114,201 +19114,201 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeActiveHardwareFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeActiveRadioFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeTestEventTriggersEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; @@ -19319,37 +19319,37 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -19371,200 +19371,200 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; @@ -19575,34 +19575,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -19624,7 +19624,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; @@ -19635,36 +19635,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -19688,7 +19688,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -19707,7 +19707,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::SoftwareDiagnosticsCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -19728,7 +19728,7 @@ - (void)resetWatermarksWithCompletionHandler:(StatusCompletion)completionHandler [self resetWatermarksWithParams:nil completionHandler:completionHandler]; } - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -19741,82 +19741,82 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeThreadMetricsWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeCurrentHeapFreeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; @@ -19827,36 +19827,36 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -19878,7 +19878,7 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeCurrentHeapUsedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; @@ -19889,36 +19889,36 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -19940,7 +19940,7 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; @@ -19951,37 +19951,37 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -20003,200 +20003,200 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; @@ -20207,34 +20207,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -20256,7 +20256,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; @@ -20267,36 +20267,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -20320,7 +20320,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -20339,7 +20339,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::ThreadNetworkDiagnosticsCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -20360,7 +20360,7 @@ - (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler [self resetCountsWithParams:nil completionHandler:completionHandler]; } - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -20373,57 +20373,57 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeChannelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeChannelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -20445,111 +20445,111 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeRoutingRoleWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeRoutingRoleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableThreadNetworkDiagnosticsClusterRoutingRoleAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeNetworkNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableCharStringAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -20573,43 +20573,43 @@ new MTRNullableCharStringAttributeCallbackBridge(queue, completionHandler, ^(Can - (void)readAttributePanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributePanIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -20631,48 +20631,48 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeExtendedPanIdWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -20694,48 +20694,48 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMeshLocalPrefixWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler + NSData * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableOctetStringAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -20757,7 +20757,7 @@ new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Ca } - (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; @@ -20768,35 +20768,35 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -20818,175 +20818,175 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeNeighborTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeNeighborTableListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsNeighborTableListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeRouteTableListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeRouteTableListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsRouteTableListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributePartitionIdWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt32uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributePartitionIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -21008,46 +21008,46 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeWeightingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeWeightingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -21069,47 +21069,47 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeDataVersionWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -21131,48 +21131,48 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeStableDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeStableDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -21194,48 +21194,48 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeLeaderRouterIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeLeaderRouterIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -21257,7 +21257,7 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeDetachedRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; @@ -21268,36 +21268,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -21319,7 +21319,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeChildRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; @@ -21330,36 +21330,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -21381,7 +21381,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRouterRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; @@ -21392,36 +21392,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -21443,7 +21443,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeLeaderRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; @@ -21454,36 +21454,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -21505,7 +21505,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; @@ -21516,36 +21516,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -21567,7 +21567,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePartitionIdChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; @@ -21578,37 +21578,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -21630,7 +21630,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeBetterPartitionAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; @@ -21641,37 +21641,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -21693,7 +21693,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeParentChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; @@ -21704,36 +21704,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -21755,7 +21755,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxTotalCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; @@ -21766,35 +21766,35 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -21816,7 +21816,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; @@ -21827,36 +21827,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -21878,7 +21878,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; @@ -21889,36 +21889,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -21940,7 +21940,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; @@ -21951,37 +21951,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22003,7 +22003,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxAckedCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; @@ -22014,35 +22014,35 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22064,7 +22064,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxNoAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; @@ -22075,37 +22075,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22127,7 +22127,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxDataCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; @@ -22138,35 +22138,35 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22188,7 +22188,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; @@ -22199,36 +22199,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22250,7 +22250,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxBeaconCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; @@ -22261,36 +22261,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22312,7 +22312,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; @@ -22323,37 +22323,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22375,7 +22375,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxOtherCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; @@ -22386,35 +22386,35 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22436,7 +22436,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxRetryCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; @@ -22447,35 +22447,35 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxRetryCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22497,7 +22497,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; @@ -22508,37 +22508,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22560,7 +22560,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; @@ -22571,37 +22571,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22623,7 +22623,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxErrCcaCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; @@ -22634,36 +22634,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxErrCcaCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22685,7 +22685,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxErrAbortCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; @@ -22696,36 +22696,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxErrAbortCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22747,7 +22747,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxErrBusyChannelCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; @@ -22758,37 +22758,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxErrBusyChannelCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22810,7 +22810,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxTotalCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; @@ -22821,35 +22821,35 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22871,7 +22871,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; @@ -22882,36 +22882,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22933,7 +22933,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; @@ -22944,36 +22944,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -22995,7 +22995,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxDataCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; @@ -23006,35 +23006,35 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -23056,7 +23056,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; @@ -23067,36 +23067,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -23118,7 +23118,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxBeaconCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; @@ -23129,36 +23129,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -23180,7 +23180,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; @@ -23191,37 +23191,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -23243,7 +23243,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxOtherCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; @@ -23254,35 +23254,35 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -23304,7 +23304,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxAddressFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; @@ -23315,37 +23315,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxAddressFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -23367,7 +23367,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxDestAddrFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; @@ -23378,37 +23378,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxDestAddrFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -23430,7 +23430,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxDuplicatedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; @@ -23441,36 +23441,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxDuplicatedCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -23492,7 +23492,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxErrNoFrameCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; @@ -23503,36 +23503,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxErrNoFrameCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -23554,7 +23554,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxErrUnknownNeighborCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; @@ -23565,37 +23565,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxErrUnknownNeighborCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -23617,7 +23617,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxErrInvalidSrcAddrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; @@ -23628,37 +23628,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -23680,7 +23680,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxErrSecCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; @@ -23691,36 +23691,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -23742,7 +23742,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxErrFcsCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; @@ -23753,36 +23753,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -23804,7 +23804,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRxErrOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; @@ -23815,36 +23815,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -23866,48 +23866,48 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeActiveTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeActiveTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -23929,48 +23929,48 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributePendingTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributePendingTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -23994,43 +23994,43 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela - (void)readAttributeDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt32uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -24055,108 +24055,108 @@ - (void)readAttributeSecurityPolicyWithCompletionHandler: (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeSecurityPolicyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeChannelMaskWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler + NSData * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableOctetStringAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelMask::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeChannelMaskWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelMask::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeChannelMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -24179,347 +24179,347 @@ new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Ca - (void)readAttributeOperationalDatasetComponentsWithCompletionHandler: (void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void) subscribeAttributeOperationalDatasetComponentsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)( - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)( + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void) readAttributeOperationalDatasetComponentsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)( - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)( + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable( - success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable( + success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeActiveNetworkFaultsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeActiveNetworkFaultsListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; @@ -24530,34 +24530,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -24579,7 +24579,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; @@ -24590,36 +24590,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -24643,7 +24643,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -24662,7 +24662,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::WiFiNetworkDiagnosticsCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -24683,7 +24683,7 @@ - (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler [self resetCountsWithParams:nil completionHandler:completionHandler]; } - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -24696,57 +24696,57 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeBssidWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableOctetStringAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeBssidWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -24768,179 +24768,179 @@ new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Ca } - (void)readAttributeSecurityTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeSecurityTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableWiFiNetworkDiagnosticsClusterSecurityTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeWiFiVersionWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeWiFiVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableWiFiNetworkDiagnosticsClusterWiFiVersionTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeChannelNumberWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeChannelNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -24964,43 +24964,43 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela - (void)readAttributeRssiWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeRssiWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -25022,7 +25022,7 @@ new MTRNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeBeaconLostCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; @@ -25033,36 +25033,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeBeaconLostCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -25084,7 +25084,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeBeaconRxCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; @@ -25095,36 +25095,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeBeaconRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -25146,7 +25146,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePacketMulticastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; @@ -25157,37 +25157,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePacketMulticastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -25209,7 +25209,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePacketMulticastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; @@ -25220,37 +25220,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePacketMulticastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -25272,7 +25272,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePacketUnicastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; @@ -25283,37 +25283,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePacketUnicastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -25335,7 +25335,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePacketUnicastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; @@ -25346,37 +25346,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -25398,7 +25398,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeCurrentMaxRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; @@ -25409,36 +25409,36 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeCurrentMaxRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -25460,7 +25460,7 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; @@ -25471,35 +25471,35 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -25521,200 +25521,200 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; @@ -25725,34 +25725,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -25774,7 +25774,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; @@ -25785,36 +25785,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -25838,7 +25838,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -25857,7 +25857,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::EthernetNetworkDiagnosticsCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -25878,7 +25878,7 @@ - (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler [self resetCountsWithParams:nil completionHandler:completionHandler]; } - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -25891,123 +25891,123 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributePHYRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFullDuplexWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableBooleanAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -26029,7 +26029,7 @@ new MTRNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancel } - (void)readAttributePacketRxCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; @@ -26040,36 +26040,36 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -26091,7 +26091,7 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePacketTxCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; @@ -26102,36 +26102,36 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -26153,7 +26153,7 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTxErrCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; @@ -26164,34 +26164,34 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -26213,7 +26213,7 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeCollisionCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; @@ -26224,36 +26224,36 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -26275,7 +26275,7 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; @@ -26286,35 +26286,35 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -26336,48 +26336,48 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableBooleanAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -26399,7 +26399,7 @@ new MTRNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancel } - (void)readAttributeTimeSinceResetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; @@ -26410,36 +26410,36 @@ new MTRInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -26461,202 +26461,202 @@ new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; @@ -26667,34 +26667,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -26716,7 +26716,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; @@ -26727,36 +26727,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -26780,7 +26780,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -26799,7 +26799,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::BridgedDeviceBasicCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -26816,7 +26816,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeVendorNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; @@ -26827,34 +26827,34 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -26876,7 +26876,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeVendorIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; @@ -26887,34 +26887,34 @@ new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, completionHandler, ^( } - (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRVendorIdAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -26936,7 +26936,7 @@ new MTRVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * } - (void)readAttributeProductNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; @@ -26947,35 +26947,35 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -26997,7 +26997,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; @@ -27012,8 +27012,8 @@ - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHa [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -27024,50 +27024,50 @@ - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -27089,7 +27089,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; @@ -27100,36 +27100,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -27151,7 +27151,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; @@ -27162,37 +27162,37 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -27214,7 +27214,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; @@ -27225,36 +27225,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -27276,7 +27276,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; @@ -27287,37 +27287,37 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -27339,7 +27339,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; @@ -27350,36 +27350,36 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -27401,7 +27401,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributePartNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; @@ -27412,34 +27412,34 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -27461,7 +27461,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeProductURLWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; @@ -27472,34 +27472,34 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -27521,7 +27521,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeProductLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; @@ -27532,35 +27532,35 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -27582,7 +27582,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; @@ -27593,35 +27593,35 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -27643,7 +27643,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeReachableWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; @@ -27654,34 +27654,34 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -27703,7 +27703,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; @@ -27714,34 +27714,34 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -27763,200 +27763,200 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBridgedDeviceBasicAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; @@ -27967,34 +27967,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -28016,7 +28016,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; @@ -28027,36 +28027,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -28080,7 +28080,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -28099,7 +28099,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::SwitchCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -28116,7 +28116,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; @@ -28127,36 +28127,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -28178,7 +28178,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; @@ -28189,36 +28189,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -28240,7 +28240,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeMultiPressMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; @@ -28251,36 +28251,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -28302,177 +28302,177 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRSwitchGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRSwitchGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRSwitchAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRSwitchAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRSwitchAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRSwitchAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -28494,7 +28494,7 @@ new MTRSwitchAttributeListListAttributeCallbackBridge(queue, completionHandler, } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; @@ -28505,34 +28505,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -28554,7 +28554,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; @@ -28565,36 +28565,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -28618,7 +28618,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -28637,7 +28637,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::AdministratorCommissioningCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -28654,7 +28654,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -28675,19 +28675,19 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -28704,15 +28704,15 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)revokeCommissioningWithCompletionHandler:(StatusCompletion)completionHandler @@ -28720,7 +28720,7 @@ - (void)revokeCommissioningWithCompletionHandler:(StatusCompletion)completionHan [self revokeCommissioningWithParams:nil completionHandler:completionHandler]; } - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -28736,19 +28736,19 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeWindowStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; @@ -28759,35 +28759,35 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -28809,7 +28809,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; @@ -28820,36 +28820,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -28871,7 +28871,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeAdminVendorIdWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; @@ -28882,36 +28882,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -28933,202 +28933,202 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; @@ -29139,34 +29139,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -29188,7 +29188,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; @@ -29199,36 +29199,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -29252,7 +29252,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -29271,7 +29271,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::OperationalCredentialsCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -29288,8 +29288,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -29302,17 +29302,17 @@ - (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestatio request.attestationNonce = [self asByteSpan:params.attestationNonce]; new MTROperationalCredentialsClusterAttestationResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -29325,17 +29325,17 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti request.certificateType = params.certificateType.unsignedCharValue; new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -29352,17 +29352,17 @@ - (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams * } new MTROperationalCredentialsClusterCSRResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -29383,17 +29383,17 @@ - (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params = static_cast>(params.adminVendorId.unsignedShortValue); new MTROperationalCredentialsClusterNOCResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -29410,17 +29410,17 @@ - (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)p } new MTROperationalCredentialsClusterNOCResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -29433,17 +29433,17 @@ - (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabri request.label = [self asCharSpan:params.label]; new MTROperationalCredentialsClusterNOCResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -29456,16 +29456,16 @@ - (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricPara request.fabricIndex = params.fabricIndex.unsignedCharValue; new MTROperationalCredentialsClusterNOCResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -29479,145 +29479,145 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROperationalCredentialsNOCsListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); + }); } - (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROperationalCredentialsNOCsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROperationalCredentialsFabricsListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); + }); } - (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROperationalCredentialsFabricsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; @@ -29628,36 +29628,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -29679,7 +29679,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; @@ -29690,37 +29690,37 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -29742,73 +29742,73 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; @@ -29819,36 +29819,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -29870,200 +29870,200 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROperationalCredentialsAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROperationalCredentialsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; @@ -30074,34 +30074,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -30123,7 +30123,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; @@ -30134,36 +30134,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -30187,7 +30187,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -30206,7 +30206,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::GroupKeyManagementCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -30223,7 +30223,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -30236,7 +30236,7 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p request.groupKeySet.groupKeySetID = params.groupKeySet.groupKeySetID.unsignedShortValue; request.groupKeySet.groupKeySecurityPolicy = static_cast>( - params.groupKeySet.groupKeySecurityPolicy.unsignedCharValue); + params.groupKeySet.groupKeySecurityPolicy.unsignedCharValue); if (params.groupKeySet.epochKey0 == nil) { request.groupKeySet.epochKey0.SetNull(); } else { @@ -30276,20 +30276,20 @@ - (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params - completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -30302,16 +30302,16 @@ - (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)par request.groupKeySetID = params.groupKeySetID.unsignedShortValue; new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -30325,20 +30325,20 @@ - (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams * new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params - completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -30372,25 +30372,25 @@ - (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAl } new MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); + }); } - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -30398,8 +30398,8 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionH [self writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -30410,159 +30410,159 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRGroupKeyManagementClusterGroupKeyMapStruct class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRGroupKeyManagementClusterGroupKeyMapStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRGroupKeyManagementClusterGroupKeyMapStruct *) value[i_0]; - listHolder_0->mList[i_0].groupId = element_0.groupId.unsignedShortValue; - listHolder_0->mList[i_0].groupKeySetID = element_0.groupKeySetID.unsignedShortValue; - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (MTRGroupKeyManagementClusterGroupKeyMapStruct *) value[i_0]; + listHolder_0->mList[i_0].groupId = element_0.groupId.unsignedShortValue; + listHolder_0->mList[i_0].groupKeySetID = element_0.groupKeySetID.unsignedShortValue; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupKeyManagementGroupTableListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); + }); } - (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupKeyManagementGroupTableListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; @@ -30573,36 +30573,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -30624,7 +30624,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; @@ -30635,37 +30635,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -30687,200 +30687,200 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupKeyManagementAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRGroupKeyManagementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; @@ -30891,34 +30891,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -30940,7 +30940,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; @@ -30951,36 +30951,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -31004,7 +31004,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -31023,7 +31023,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::FixedLabelCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -31040,46 +31040,46 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeLabelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFixedLabelLabelListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFixedLabelLabelListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -31101,200 +31101,200 @@ new MTRFixedLabelLabelListListAttributeCallbackBridge(queue, completionHandler, } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFixedLabelAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFixedLabelAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; @@ -31305,34 +31305,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -31354,7 +31354,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; @@ -31365,36 +31365,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -31418,7 +31418,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -31437,7 +31437,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::UserLabelCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -31454,15 +31454,15 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeLabelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRUserLabelLabelListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -31470,8 +31470,8 @@ - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHan [self writeAttributeLabelListWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -31482,72 +31482,72 @@ - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRUserLabelClusterLabelStruct class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRUserLabelClusterLabelStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUserLabelClusterLabelStruct *) value[i_0]; - listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; - listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (MTRUserLabelClusterLabelStruct *) value[i_0]; + listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; + listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRUserLabelLabelListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -31569,200 +31569,200 @@ new MTRUserLabelLabelListListAttributeCallbackBridge(queue, completionHandler, ^ } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRUserLabelGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRUserLabelGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRUserLabelAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRUserLabelAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRUserLabelAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRUserLabelAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; @@ -31773,34 +31773,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -31822,7 +31822,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; @@ -31833,36 +31833,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -31886,7 +31886,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -31905,7 +31905,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::BooleanStateCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -31922,7 +31922,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeStateValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; @@ -31933,34 +31933,34 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)subscribeAttributeStateValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -31982,200 +31982,200 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanStateAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanStateAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; @@ -32186,34 +32186,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -32235,7 +32235,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; @@ -32246,36 +32246,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -32299,7 +32299,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -32318,7 +32318,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::ModeSelectCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -32335,7 +32335,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -32349,19 +32349,19 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeDescriptionWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; @@ -32372,35 +32372,35 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -32422,48 +32422,48 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -32485,71 +32485,71 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeSupportedModesWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRModeSelectSupportedModesListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRModeSelectSupportedModesListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeCurrentModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; @@ -32560,35 +32560,35 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -32610,15 +32610,15 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeStartUpModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -32626,8 +32626,8 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completio [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -32638,56 +32638,56 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -32711,12 +32711,12 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab - (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -32724,8 +32724,8 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHand [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -32736,55 +32736,55 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -32806,200 +32806,200 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRModeSelectGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRModeSelectGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRModeSelectAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRModeSelectAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRModeSelectAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRModeSelectAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; @@ -33010,34 +33010,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -33059,7 +33059,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; @@ -33070,36 +33070,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -33123,7 +33123,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -33142,7 +33142,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::DoorLockCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -33159,7 +33159,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33181,19 +33181,19 @@ - (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33215,19 +33215,19 @@ - (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)par new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33248,19 +33248,19 @@ - (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams * new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33280,20 +33280,20 @@ - (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params - completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33307,16 +33307,16 @@ - (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams request.userIndex = params.userIndex.unsignedShortValue; new MTRDoorLockClusterGetWeekDayScheduleResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33331,19 +33331,19 @@ - (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDaySchedulePa new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33360,20 +33360,20 @@ - (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params - completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33387,16 +33387,16 @@ - (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams request.userIndex = params.userIndex.unsignedShortValue; new MTRDoorLockClusterGetYearDayScheduleResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33411,19 +33411,19 @@ - (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDaySchedulePa new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33441,20 +33441,20 @@ - (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params - completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33467,16 +33467,16 @@ - (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams request.holidayIndex = params.holidayIndex.unsignedCharValue; new MTRDoorLockClusterGetHolidayScheduleResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33490,15 +33490,15 @@ - (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidaySchedulePa new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completionHandler:(StatusCompletion)completionHandler @@ -33550,20 +33550,20 @@ - (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completionHa new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params - completionHandler: - (void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33576,12 +33576,12 @@ - (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params request.userIndex = params.userIndex.unsignedShortValue; new MTRDoorLockClusterGetUserResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completionHandler:(StatusCompletion)completionHandler @@ -33601,20 +33601,20 @@ - (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completi new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params - completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33630,7 +33630,7 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params request.operationType = static_cast>(params.operationType.unsignedCharValue); request.credential.credentialType = static_cast>( - params.credential.credentialType.unsignedCharValue); + params.credential.credentialType.unsignedCharValue); request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; request.credentialData = [self asByteSpan:params.credentialData]; if (params.userIndex == nil) { @@ -33653,17 +33653,17 @@ - (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params } new MTRDoorLockClusterSetCredentialResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params - completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33674,20 +33674,20 @@ - (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusPara } } request.credential.credentialType = static_cast>( - params.credential.credentialType.unsignedCharValue); + params.credential.credentialType.unsignedCharValue); request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; new MTRDoorLockClusterGetCredentialStatusResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -33705,149 +33705,149 @@ - (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)par } else { auto & nonNullValue_0 = request.credential.SetNonNull(); nonNullValue_0.credentialType = static_cast>( - params.credential.credentialType.unsignedCharValue); + params.credential.credentialType.unsignedCharValue); nonNullValue_0.credentialIndex = params.credential.credentialIndex.unsignedShortValue; } new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeLockStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeLockStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLockStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableDoorLockClusterDlLockStateAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeLockTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDoorLockClusterDlLockTypeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeLockTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLockTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDoorLockClusterDlLockTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeActuatorEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; @@ -33858,36 +33858,36 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)subscribeAttributeActuatorEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActuatorEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -33909,69 +33909,69 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeDoorStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeDoorStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDoorStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableDoorLockClusterDlDoorStateAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeDoorOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; @@ -33986,8 +33986,8 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value complet [self writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -33998,52 +33998,52 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeDoorOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDoorOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -34065,7 +34065,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeDoorClosedEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; @@ -34080,8 +34080,8 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value compl [self writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -34092,52 +34092,52 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeDoorClosedEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDoorClosedEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -34159,7 +34159,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeOpenPeriodWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; @@ -34174,8 +34174,8 @@ - (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completionH [self writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -34186,50 +34186,50 @@ - (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -34251,7 +34251,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; @@ -34262,37 +34262,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -34314,7 +34314,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeNumberOfPINUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; @@ -34325,37 +34325,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -34377,7 +34377,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeNumberOfRFIDUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; @@ -34388,37 +34388,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -34440,7 +34440,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; @@ -34451,38 +34451,38 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -34504,7 +34504,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; @@ -34515,38 +34515,38 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -34568,7 +34568,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; @@ -34579,37 +34579,37 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -34631,7 +34631,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeMaxPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; @@ -34642,36 +34642,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeMaxPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -34693,7 +34693,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeMinPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; @@ -34704,36 +34704,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeMinPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -34755,7 +34755,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeMaxRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; @@ -34766,36 +34766,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeMaxRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -34817,7 +34817,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeMinRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; @@ -34828,36 +34828,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeMinRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -34879,72 +34879,72 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeCredentialRulesSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCredentialRulesSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCredentialRulesSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDoorLockCredentialRulesSupportAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; @@ -34955,37 +34955,37 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -35007,7 +35007,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeLanguageWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::Language::TypeInfo; @@ -35022,8 +35022,8 @@ - (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completionHan [self writeAttributeLanguageWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -35034,50 +35034,50 @@ - (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLanguageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -35099,7 +35099,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeLEDSettingsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; @@ -35114,8 +35114,8 @@ - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completion [self writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -35126,51 +35126,51 @@ - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeLEDSettingsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLEDSettingsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -35192,7 +35192,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeAutoRelockTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; @@ -35207,8 +35207,8 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value complet [self writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -35219,52 +35219,52 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAutoRelockTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -35286,7 +35286,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeSoundVolumeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; @@ -35301,8 +35301,8 @@ - (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completion [self writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -35313,51 +35313,51 @@ - (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeSoundVolumeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSoundVolumeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -35379,15 +35379,15 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeOperatingModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -35395,8 +35395,8 @@ - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completi [self writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -35407,205 +35407,205 @@ - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOperatingModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOperatingModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDoorLockClusterDlOperatingModeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeSupportedOperatingModesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeSupportedOperatingModesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSupportedOperatingModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDoorLockSupportedOperatingModesAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeDefaultConfigurationRegisterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeDefaultConfigurationRegisterWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDefaultConfigurationRegisterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeEnableLocalProgrammingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; @@ -35616,13 +35616,13 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -35633,53 +35633,53 @@ - (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeEnableLocalProgrammingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeEnableLocalProgrammingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -35701,7 +35701,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeEnableOneTouchLockingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; @@ -35712,13 +35712,13 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -35729,53 +35729,53 @@ - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeEnableOneTouchLockingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeEnableOneTouchLockingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -35797,7 +35797,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeEnableInsideStatusLEDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; @@ -35808,13 +35808,13 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -35825,53 +35825,53 @@ - (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeEnableInsideStatusLEDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeEnableInsideStatusLEDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -35893,7 +35893,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeEnablePrivacyModeButtonWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; @@ -35904,15 +35904,15 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -35923,53 +35923,53 @@ - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)valu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeEnablePrivacyModeButtonWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeEnablePrivacyModeButtonWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -35991,27 +35991,27 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeLocalProgrammingFeaturesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -36022,76 +36022,76 @@ - (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)val new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeLocalProgrammingFeaturesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLocalProgrammingFeaturesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeWrongCodeEntryLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; @@ -36106,8 +36106,8 @@ - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value co [self writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -36118,53 +36118,53 @@ - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeWrongCodeEntryLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeWrongCodeEntryLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -36186,7 +36186,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; @@ -36197,15 +36197,15 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -36216,53 +36216,53 @@ - (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -36284,7 +36284,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeSendPINOverTheAirWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; @@ -36299,8 +36299,8 @@ - (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value comp [self writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -36311,52 +36311,52 @@ - (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeSendPINOverTheAirWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSendPINOverTheAirWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -36378,7 +36378,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeRequirePINforRemoteOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; @@ -36389,15 +36389,15 @@ new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(C } - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -36408,53 +36408,53 @@ - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeRequirePINforRemoteOperationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRequirePINforRemoteOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -36476,7 +36476,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeExpiringUserTimeoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; @@ -36491,8 +36491,8 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value co [self writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -36503,53 +36503,53 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeExpiringUserTimeoutWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeExpiringUserTimeoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -36571,200 +36571,200 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRDoorLockGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDoorLockGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRDoorLockAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDoorLockAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDoorLockAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDoorLockAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; @@ -36775,34 +36775,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -36824,7 +36824,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; @@ -36835,36 +36835,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -36888,7 +36888,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -36907,7 +36907,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::WindowCoveringCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -36928,7 +36928,7 @@ - (void)upOrOpenWithCompletionHandler:(StatusCompletion)completionHandler [self upOrOpenWithParams:nil completionHandler:completionHandler]; } - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -36941,15 +36941,15 @@ - (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)downOrCloseWithCompletionHandler:(StatusCompletion)completionHandler @@ -36957,7 +36957,7 @@ - (void)downOrCloseWithCompletionHandler:(StatusCompletion)completionHandler [self downOrCloseWithParams:nil completionHandler:completionHandler]; } - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -36970,15 +36970,15 @@ - (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Null new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)stopMotionWithCompletionHandler:(StatusCompletion)completionHandler @@ -36986,7 +36986,7 @@ - (void)stopMotionWithCompletionHandler:(StatusCompletion)completionHandler [self stopMotionWithParams:nil completionHandler:completionHandler]; } - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -36999,19 +36999,19 @@ - (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullab new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -37025,19 +37025,19 @@ - (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -37051,19 +37051,19 @@ - (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentage new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -37077,19 +37077,19 @@ - (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -37103,80 +37103,80 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringClusterTypeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringClusterTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringClusterTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributePhysicalClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; @@ -37187,37 +37187,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -37239,7 +37239,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePhysicalClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; @@ -37250,37 +37250,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -37302,49 +37302,49 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeCurrentPositionLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCurrentPositionLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -37366,49 +37366,49 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeCurrentPositionTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCurrentPositionTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -37430,7 +37430,7 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNumberOfActuationsLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; @@ -37441,37 +37441,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -37493,7 +37493,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeNumberOfActuationsTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; @@ -37504,37 +37504,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -37556,112 +37556,112 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeConfigStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringConfigStatusAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeConfigStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringConfigStatusAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeCurrentPositionLiftPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -37683,49 +37683,49 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeCurrentPositionTiltPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -37747,113 +37747,113 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeOperationalStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRWindowCoveringOperationalStatusAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeOperationalStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringOperationalStatusAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -37875,49 +37875,49 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -37939,113 +37939,113 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeEndProductTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeEndProductTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringClusterEndProductTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringClusterEndProductTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -38067,49 +38067,49 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -38131,7 +38131,7 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeInstalledOpenLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; @@ -38142,37 +38142,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeInstalledOpenLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -38194,7 +38194,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeInstalledClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; @@ -38205,37 +38205,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -38257,7 +38257,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeInstalledOpenLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; @@ -38268,37 +38268,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeInstalledOpenLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -38320,7 +38320,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeInstalledClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; @@ -38331,37 +38331,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeInstalledClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -38385,12 +38385,12 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)readAttributeModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringModeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -38398,8 +38398,8 @@ - (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completionHandler [self writeAttributeModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -38410,50 +38410,50 @@ - (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRWindowCoveringModeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringModeAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -38475,263 +38475,263 @@ new MTRWindowCoveringModeAttributeCallbackBridge(queue, completionHandler, ^(Can } - (void)readAttributeSafetyStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringSafetyStatusAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringSafetyStatusAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWindowCoveringAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; @@ -38742,34 +38742,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -38791,7 +38791,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; @@ -38802,36 +38802,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -38855,7 +38855,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -38874,7 +38874,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::BarrierControlCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -38891,7 +38891,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -38905,15 +38905,15 @@ - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierCont new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)barrierControlStopWithCompletionHandler:(StatusCompletion)completionHandler @@ -38921,7 +38921,7 @@ - (void)barrierControlStopWithCompletionHandler:(StatusCompletion)completionHand [self barrierControlStopWithParams:nil completionHandler:completionHandler]; } - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -38934,19 +38934,19 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeBarrierMovingStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; @@ -38957,36 +38957,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeBarrierMovingStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -39008,7 +39008,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeBarrierSafetyStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; @@ -39019,37 +39019,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeBarrierSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -39071,7 +39071,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeBarrierCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; @@ -39082,37 +39082,37 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -39134,7 +39134,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeBarrierOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; @@ -39149,8 +39149,8 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value comp [self writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -39161,52 +39161,52 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -39228,7 +39228,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeBarrierCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; @@ -39243,8 +39243,8 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value com [self writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -39255,52 +39255,52 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -39322,7 +39322,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeBarrierCommandOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; @@ -39333,15 +39333,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -39352,53 +39352,53 @@ - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)val new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -39420,7 +39420,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeBarrierCommandCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; @@ -39431,15 +39431,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -39450,53 +39450,53 @@ - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)va new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -39518,7 +39518,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeBarrierOpenPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; @@ -39533,8 +39533,8 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value comp [self writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -39545,52 +39545,52 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -39612,7 +39612,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeBarrierClosePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; @@ -39627,8 +39627,8 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value com [self writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -39639,52 +39639,52 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -39706,7 +39706,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeBarrierPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; @@ -39717,36 +39717,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -39768,200 +39768,200 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBarrierControlAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBarrierControlAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; @@ -39972,34 +39972,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -40021,7 +40021,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; @@ -40032,36 +40032,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -40085,7 +40085,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -40104,7 +40104,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::PumpConfigurationAndControlCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -40121,47 +40121,47 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeMaxPressureWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -40183,46 +40183,46 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -40246,43 +40246,43 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela - (void)readAttributeMaxFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -40304,48 +40304,48 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -40367,48 +40367,48 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -40430,48 +40430,48 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -40493,48 +40493,48 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -40556,48 +40556,48 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -40619,48 +40619,48 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -40682,47 +40682,47 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -40744,47 +40744,47 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -40806,47 +40806,47 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMinConstTempWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -40868,47 +40868,47 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -40930,243 +40930,243 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributePumpStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeCapacityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -41190,43 +41190,43 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela - (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -41248,25 +41248,25 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt32uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -41277,58 +41277,58 @@ - (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -41352,43 +41352,43 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela - (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt32uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -41410,27 +41410,27 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt32uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -41441,58 +41441,58 @@ - (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)valu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -41514,16 +41514,16 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeOperationModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -41531,8 +41531,8 @@ - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completi [self writeAttributeOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -41543,86 +41543,86 @@ - (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeControlModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -41630,8 +41630,8 @@ - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completion [self writeAttributeControlModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -41642,273 +41642,273 @@ - (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; @@ -41919,34 +41919,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -41968,7 +41968,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; @@ -41979,36 +41979,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -42032,7 +42032,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -42051,7 +42051,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::ThermostatCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -42068,7 +42068,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -42083,19 +42083,19 @@ - (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerPara new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -42107,7 +42107,7 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams } request.numberOfTransitionsForSequence = params.numberOfTransitionsForSequence.unsignedCharValue; request.dayOfWeekForSequence = static_cast>( - params.dayOfWeekForSequence.unsignedCharValue); + params.dayOfWeekForSequence.unsignedCharValue); request.modeForSequence = static_cast>(params.modeForSequence.unsignedCharValue); { @@ -42147,20 +42147,20 @@ - (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params - completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -42176,12 +42176,12 @@ - (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams = static_cast>(params.modeToReturn.unsignedCharValue); new MTRThermostatClusterGetWeeklyScheduleResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)clearWeeklyScheduleWithCompletionHandler:(StatusCompletion)completionHandler @@ -42189,7 +42189,7 @@ - (void)clearWeeklyScheduleWithCompletionHandler:(StatusCompletion)completionHan [self clearWeeklyScheduleWithParams:nil completionHandler:completionHandler]; } - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -42202,60 +42202,60 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeLocalTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -42277,48 +42277,48 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeOutdoorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -42340,7 +42340,7 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeOccupancyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; @@ -42351,34 +42351,34 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -42400,7 +42400,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; @@ -42411,37 +42411,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -42463,7 +42463,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; @@ -42474,37 +42474,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -42526,7 +42526,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; @@ -42537,37 +42537,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -42589,7 +42589,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; @@ -42600,37 +42600,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -42652,7 +42652,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePICoolingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; @@ -42663,36 +42663,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributePICoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -42714,7 +42714,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributePIHeatingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; @@ -42725,36 +42725,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributePIHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -42776,7 +42776,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; @@ -42787,15 +42787,15 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -42806,53 +42806,53 @@ - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -42874,7 +42874,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; @@ -42885,15 +42885,15 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -42904,53 +42904,53 @@ - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.charValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -42972,7 +42972,7 @@ new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; @@ -42983,15 +42983,15 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -43002,53 +43002,53 @@ - (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)valu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -43070,7 +43070,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; @@ -43081,15 +43081,15 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -43100,53 +43100,53 @@ - (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)valu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -43168,7 +43168,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; @@ -43179,15 +43179,15 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -43198,53 +43198,53 @@ - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)va new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -43266,7 +43266,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; @@ -43277,15 +43277,15 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -43296,53 +43296,53 @@ - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)va new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -43364,7 +43364,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; @@ -43379,8 +43379,8 @@ - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value c [self writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -43391,53 +43391,53 @@ - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -43459,7 +43459,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; @@ -43474,8 +43474,8 @@ - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value c [self writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -43486,53 +43486,53 @@ - (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -43554,7 +43554,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; @@ -43569,8 +43569,8 @@ - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value c [self writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -43581,53 +43581,53 @@ - (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -43649,7 +43649,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; @@ -43664,8 +43664,8 @@ - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value c [self writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -43676,53 +43676,53 @@ - (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -43744,7 +43744,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMinSetpointDeadBandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; @@ -43759,8 +43759,8 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value co [self writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -43771,53 +43771,53 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.charValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -43839,7 +43839,7 @@ new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeRemoteSensingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; @@ -43854,8 +43854,8 @@ - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completi [self writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -43866,52 +43866,52 @@ - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -43933,27 +43933,27 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeControlSequenceOfOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -43964,76 +43964,76 @@ - (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)v new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRThermostatClusterThermostatControlSequenceAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeSystemModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; @@ -44048,8 +44048,8 @@ - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completionH [self writeAttributeSystemModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -44060,50 +44060,50 @@ - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -44125,7 +44125,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeThermostatRunningModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; @@ -44136,37 +44136,37 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -44188,7 +44188,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeStartOfWeekWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; @@ -44199,35 +44199,35 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -44249,7 +44249,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; @@ -44260,37 +44260,37 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -44312,7 +44312,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; @@ -44323,37 +44323,37 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -44375,7 +44375,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeTemperatureSetpointHoldWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; @@ -44386,15 +44386,15 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -44405,53 +44405,53 @@ - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)valu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -44473,27 +44473,27 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeTemperatureSetpointHoldDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -44504,58 +44504,58 @@ - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Null new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -44577,7 +44577,7 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeThermostatProgrammingOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; @@ -44588,15 +44588,15 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -44607,53 +44607,53 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _N new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -44675,7 +44675,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeThermostatRunningStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; @@ -44686,37 +44686,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -44738,7 +44738,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeSetpointChangeSourceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; @@ -44749,37 +44749,37 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -44801,49 +44801,49 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeSetpointChangeAmountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -44865,7 +44865,7 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeSetpointChangeSourceTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; @@ -44876,37 +44876,37 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -44928,15 +44928,15 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeOccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -44944,8 +44944,8 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value compl [self writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -44956,57 +44956,57 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -45028,48 +45028,48 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeOccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeOccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -45091,48 +45091,48 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeOccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeOccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -45154,15 +45154,15 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeUnoccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -45170,8 +45170,8 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value com [self writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -45182,57 +45182,57 @@ - (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeUnoccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -45254,49 +45254,49 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeUnoccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeUnoccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -45318,49 +45318,49 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeUnoccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeUnoccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -45382,7 +45382,7 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeEmergencyHeatDeltaWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; @@ -45397,8 +45397,8 @@ - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value com [self writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -45409,52 +45409,52 @@ - (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeEmergencyHeatDeltaWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -45490,8 +45490,8 @@ - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeACTypeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -45502,50 +45502,50 @@ - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeACTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -45567,7 +45567,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeACCapacityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; @@ -45582,8 +45582,8 @@ - (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completionH [self writeAttributeACCapacityWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -45594,50 +45594,50 @@ - (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeACCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -45659,7 +45659,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeACRefrigerantTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; @@ -45674,8 +45674,8 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value comp [self writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -45686,52 +45686,52 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeACRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -45753,7 +45753,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeACCompressorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; @@ -45768,8 +45768,8 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value compl [self writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -45780,52 +45780,52 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeACCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -45847,7 +45847,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeACErrorCodeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; @@ -45862,8 +45862,8 @@ - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completion [self writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -45874,51 +45874,51 @@ - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeACErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -45940,7 +45940,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeACLouverPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; @@ -45955,8 +45955,8 @@ - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value compl [self writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -45967,52 +45967,52 @@ - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeACLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -46034,48 +46034,48 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeACCoilTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeACCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -46097,7 +46097,7 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeACCapacityformatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; @@ -46112,8 +46112,8 @@ - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value compl [self writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -46124,52 +46124,52 @@ - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeACCapacityformatWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -46191,200 +46191,200 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRThermostatGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThermostatGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRThermostatAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThermostatAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThermostatAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThermostatAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; @@ -46395,34 +46395,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -46444,7 +46444,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; @@ -46455,36 +46455,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -46508,7 +46508,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -46527,7 +46527,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::FanControlCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -46546,12 +46546,12 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q - (void)readAttributeFanModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFanControlClusterFanModeTypeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -46559,8 +46559,8 @@ - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHand [self writeAttributeFanModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -46571,81 +46571,81 @@ - (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFanControlClusterFanModeTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -46653,8 +46653,8 @@ - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value comple [self writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -46665,83 +46665,83 @@ - (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFanControlClusterFanModeSequenceTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -46749,8 +46749,8 @@ - (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value comple [self writeAttributePercentSettingWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -46761,57 +46761,57 @@ - (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -46833,7 +46833,7 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributePercentCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; @@ -46844,36 +46844,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -46895,7 +46895,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeSpeedMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; @@ -46906,34 +46906,34 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -46955,15 +46955,15 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeSpeedSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -46971,8 +46971,8 @@ - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completi [self writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -46983,56 +46983,56 @@ - (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -47054,7 +47054,7 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeSpeedCurrentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; @@ -47065,35 +47065,35 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -47115,7 +47115,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeRockSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; @@ -47126,35 +47126,35 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRockSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -47176,7 +47176,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeRockSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; @@ -47191,8 +47191,8 @@ - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completion [self writeAttributeRockSettingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -47203,51 +47203,51 @@ - (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRockSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -47269,7 +47269,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeWindSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; @@ -47280,35 +47280,35 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -47330,7 +47330,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeWindSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; @@ -47345,8 +47345,8 @@ - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completion [self writeAttributeWindSettingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -47357,51 +47357,51 @@ - (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -47423,200 +47423,200 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRFanControlGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFanControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRFanControlAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFanControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFanControlAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFanControlAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; @@ -47627,34 +47627,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -47676,7 +47676,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; @@ -47687,36 +47687,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -47740,7 +47740,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -47759,7 +47759,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::ThermostatUserInterfaceConfigurationCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -47776,7 +47776,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeTemperatureDisplayModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; @@ -47787,13 +47787,13 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -47804,53 +47804,53 @@ - (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeTemperatureDisplayModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -47872,7 +47872,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeKeypadLockoutWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; @@ -47887,8 +47887,8 @@ - (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completi [self writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -47899,52 +47899,52 @@ - (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeKeypadLockoutWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -47966,7 +47966,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeScheduleProgrammingVisibilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; @@ -47977,15 +47977,15 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -47996,53 +47996,53 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnul new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -48064,214 +48064,214 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable( - success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable( + success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable( - success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable( + success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; @@ -48282,34 +48282,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -48331,7 +48331,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; @@ -48342,36 +48342,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -48395,7 +48395,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -48414,7 +48414,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::ColorControlCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -48448,15 +48448,15 @@ - (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params comp new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completionHandler:(StatusCompletion)completionHandler @@ -48476,15 +48476,15 @@ - (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completi new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completionHandler:(StatusCompletion)completionHandler @@ -48505,19 +48505,19 @@ - (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completi new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -48534,19 +48534,19 @@ - (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -48563,19 +48563,19 @@ - (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -48593,19 +48593,19 @@ - (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)p new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -48623,19 +48623,19 @@ - (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSatu new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -48653,15 +48653,15 @@ - (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completionHandler:(StatusCompletion)completionHandler @@ -48681,15 +48681,15 @@ - (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params comp new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completionHandler:(StatusCompletion)completionHandler @@ -48710,19 +48710,19 @@ - (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params comp new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -48739,19 +48739,19 @@ - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTempe new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -48769,19 +48769,19 @@ - (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHuePara new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -48798,19 +48798,19 @@ - (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams * new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -48828,19 +48828,19 @@ - (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams * new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -48858,19 +48858,19 @@ - (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhanced new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -48890,19 +48890,19 @@ - (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)param new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -48917,19 +48917,19 @@ - (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)param new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -48948,19 +48948,19 @@ - (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatu new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -48980,19 +48980,19 @@ - (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatu new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeCurrentHueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; @@ -49003,34 +49003,34 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -49052,7 +49052,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeCurrentSaturationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; @@ -49063,36 +49063,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -49114,7 +49114,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; @@ -49125,36 +49125,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -49176,7 +49176,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeCurrentXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; @@ -49187,34 +49187,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -49236,7 +49236,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeCurrentYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; @@ -49247,34 +49247,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -49296,7 +49296,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeDriftCompensationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; @@ -49307,36 +49307,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -49358,7 +49358,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeCompensationTextWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; @@ -49369,36 +49369,36 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -49420,7 +49420,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeColorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorTemperature::TypeInfo; @@ -49431,36 +49431,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeColorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -49482,7 +49482,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeColorModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; @@ -49493,34 +49493,34 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -49556,8 +49556,8 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHand [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -49568,50 +49568,50 @@ - (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Options::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Options::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Options::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Options::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -49633,48 +49633,48 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeNumberOfPrimariesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNumberOfPrimariesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -49696,7 +49696,7 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributePrimary1XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; @@ -49707,34 +49707,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary1XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -49756,7 +49756,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePrimary1YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; @@ -49767,34 +49767,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary1YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -49816,48 +49816,48 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePrimary1IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary1IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -49879,7 +49879,7 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributePrimary2XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; @@ -49890,34 +49890,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary2XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -49939,7 +49939,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePrimary2YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; @@ -49950,34 +49950,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary2YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -49999,48 +49999,48 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePrimary2IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary2IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -50062,7 +50062,7 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributePrimary3XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; @@ -50073,34 +50073,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary3XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -50122,7 +50122,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePrimary3YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; @@ -50133,34 +50133,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary3YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -50182,48 +50182,48 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePrimary3IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary3IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -50245,7 +50245,7 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributePrimary4XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; @@ -50256,34 +50256,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary4XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -50305,7 +50305,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePrimary4YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; @@ -50316,34 +50316,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary4YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -50365,48 +50365,48 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePrimary4IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary4IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -50428,7 +50428,7 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributePrimary5XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; @@ -50439,34 +50439,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -50488,7 +50488,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePrimary5YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; @@ -50499,34 +50499,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -50548,48 +50548,48 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePrimary5IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -50611,7 +50611,7 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributePrimary6XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; @@ -50622,34 +50622,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -50671,7 +50671,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePrimary6YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; @@ -50682,34 +50682,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary6YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -50731,48 +50731,48 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePrimary6IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePrimary6IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -50794,7 +50794,7 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeWhitePointXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; @@ -50809,8 +50809,8 @@ - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completion [self writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -50821,51 +50821,51 @@ - (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -50887,7 +50887,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeWhitePointYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; @@ -50902,8 +50902,8 @@ - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completion [self writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -50914,51 +50914,51 @@ - (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -50980,7 +50980,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeColorPointRXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; @@ -50995,8 +50995,8 @@ - (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completio [self writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -51007,51 +51007,51 @@ - (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorPointRXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -51073,7 +51073,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeColorPointRYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; @@ -51088,8 +51088,8 @@ - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completio [self writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -51100,51 +51100,51 @@ - (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -51166,25 +51166,25 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeColorPointRIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -51195,58 +51195,58 @@ - (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorPointRIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -51268,7 +51268,7 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeColorPointGXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; @@ -51283,8 +51283,8 @@ - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completio [self writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -51295,51 +51295,51 @@ - (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -51361,7 +51361,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeColorPointGYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; @@ -51376,8 +51376,8 @@ - (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completio [self writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -51388,51 +51388,51 @@ - (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -51454,25 +51454,25 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeColorPointGIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -51483,58 +51483,58 @@ - (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -51556,7 +51556,7 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeColorPointBXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; @@ -51571,8 +51571,8 @@ - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completio [self writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -51583,51 +51583,51 @@ - (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -51649,7 +51649,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeColorPointBYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; @@ -51664,8 +51664,8 @@ - (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completio [self writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -51676,51 +51676,51 @@ - (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -51742,25 +51742,25 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeColorPointBIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -51771,58 +51771,58 @@ - (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorPointBIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -51844,7 +51844,7 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeEnhancedCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; @@ -51855,36 +51855,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -51906,7 +51906,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeEnhancedColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; @@ -51917,36 +51917,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -51968,7 +51968,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeColorLoopActiveWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; @@ -51979,36 +51979,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorLoopActiveWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -52030,7 +52030,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeColorLoopDirectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; @@ -52041,36 +52041,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -52092,7 +52092,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeColorLoopTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; @@ -52103,36 +52103,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorLoopTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -52154,7 +52154,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeColorLoopStartEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; @@ -52165,37 +52165,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -52217,7 +52217,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; @@ -52228,37 +52228,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -52280,7 +52280,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeColorCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; @@ -52291,36 +52291,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -52342,7 +52342,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; @@ -52353,37 +52353,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorTempPhysicalMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -52405,7 +52405,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; @@ -52416,37 +52416,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -52468,7 +52468,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; @@ -52479,37 +52479,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -52531,7 +52531,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; @@ -52542,15 +52542,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -52561,53 +52561,53 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nonnul new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -52629,200 +52629,200 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRColorControlGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRColorControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRColorControlAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRColorControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRColorControlAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRColorControlAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; @@ -52833,34 +52833,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -52882,7 +52882,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; @@ -52893,36 +52893,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -52946,7 +52946,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -52965,7 +52965,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::IlluminanceMeasurementCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -52982,48 +52982,48 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -53045,48 +53045,48 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -53108,48 +53108,48 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -53171,7 +53171,7 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; @@ -53182,34 +53182,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -53231,48 +53231,48 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeLightSensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -53294,200 +53294,200 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; @@ -53498,34 +53498,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -53547,7 +53547,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; @@ -53558,36 +53558,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -53611,7 +53611,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -53630,7 +53630,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::TemperatureMeasurementCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -53647,48 +53647,48 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -53710,48 +53710,48 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -53773,48 +53773,48 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -53836,7 +53836,7 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; @@ -53847,34 +53847,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -53896,200 +53896,200 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; @@ -54100,34 +54100,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -54149,7 +54149,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; @@ -54160,36 +54160,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -54213,7 +54213,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -54232,7 +54232,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::PressureMeasurementCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -54249,48 +54249,48 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -54312,48 +54312,48 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -54375,48 +54375,48 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -54438,7 +54438,7 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; @@ -54449,34 +54449,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -54498,47 +54498,47 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeScaledValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -54560,48 +54560,48 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -54623,48 +54623,48 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -54686,7 +54686,7 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; @@ -54697,36 +54697,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -54758,34 +54758,34 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -54807,200 +54807,200 @@ new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPressureMeasurementAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRPressureMeasurementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; @@ -55011,34 +55011,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -55060,7 +55060,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; @@ -55071,36 +55071,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -55124,7 +55124,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -55143,7 +55143,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::FlowMeasurementCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -55160,48 +55160,48 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -55223,48 +55223,48 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -55286,48 +55286,48 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -55349,7 +55349,7 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; @@ -55360,34 +55360,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -55409,200 +55409,200 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFlowMeasurementAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFlowMeasurementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; @@ -55613,34 +55613,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -55662,7 +55662,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; @@ -55673,36 +55673,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -55726,7 +55726,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -55745,7 +55745,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::RelativeHumidityMeasurementCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -55762,48 +55762,48 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -55825,48 +55825,48 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -55888,48 +55888,48 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -55951,7 +55951,7 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; @@ -55962,34 +55962,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -56011,205 +56011,205 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; @@ -56220,34 +56220,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -56269,7 +56269,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; @@ -56280,36 +56280,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -56333,7 +56333,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -56352,7 +56352,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::OccupancySensingCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -56369,7 +56369,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeOccupancyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; @@ -56380,34 +56380,34 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -56429,7 +56429,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeOccupancySensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; @@ -56440,37 +56440,37 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -56492,7 +56492,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; @@ -56503,37 +56503,37 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -56555,7 +56555,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; @@ -56566,15 +56566,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -56585,53 +56585,53 @@ - (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -56653,7 +56653,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; @@ -56664,15 +56664,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -56683,53 +56683,53 @@ - (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -56751,7 +56751,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; @@ -56762,15 +56762,15 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -56781,53 +56781,53 @@ - (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Non new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -56849,7 +56849,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; @@ -56860,15 +56860,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -56879,53 +56879,53 @@ - (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _ new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -56947,7 +56947,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; @@ -56958,15 +56958,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -56977,53 +56977,53 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _ new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -57045,7 +57045,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; @@ -57056,15 +57056,15 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -57075,53 +57075,53 @@ - (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -57143,7 +57143,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; @@ -57154,15 +57154,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -57173,54 +57173,54 @@ - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumbe new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -57242,7 +57242,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; @@ -57253,15 +57253,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -57272,54 +57272,54 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumbe new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -57352,15 +57352,15 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -57371,54 +57371,54 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSN new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -57440,200 +57440,200 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROccupancySensingAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTROccupancySensingAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; @@ -57644,34 +57644,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -57693,7 +57693,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; @@ -57704,36 +57704,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -57757,7 +57757,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -57776,7 +57776,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::WakeOnLanCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -57793,7 +57793,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeMACAddressWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; @@ -57804,34 +57804,34 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeMACAddressWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMACAddressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -57853,200 +57853,200 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWakeOnLanGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWakeOnLanAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWakeOnLanAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRWakeOnLanAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; @@ -58057,34 +58057,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -58106,7 +58106,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; @@ -58117,36 +58117,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -58170,7 +58170,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -58189,7 +58189,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::ChannelCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -58206,8 +58206,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params - completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -58220,16 +58220,16 @@ - (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params request.match = [self asCharSpan:params.match]; new MTRChannelClusterChangeChannelResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -58244,15 +58244,15 @@ - (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberP new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completionHandler:(StatusCompletion)completionHandler @@ -58269,58 +58269,58 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params compl new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeChannelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRChannelChannelListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeChannelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRChannelChannelListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeChannelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRChannelChannelListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -58342,48 +58342,48 @@ new MTRChannelChannelListListAttributeCallbackBridge(queue, completionHandler, ^ } - (void)readAttributeLineupWithCompletionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRChannelLineupStructAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::Lineup::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::Lineup::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeLineupWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRChannelLineupStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::Lineup::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Channel::Attributes::Lineup::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLineupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRChannelLineupStructAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -58405,241 +58405,241 @@ new MTRChannelLineupStructAttributeCallbackBridge(queue, completionHandler, ^(Ca } - (void)readAttributeCurrentChannelWithCompletionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRChannelCurrentChannelStructAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCurrentChannelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRChannelCurrentChannelStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRChannelGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRChannelGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRChannelAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRChannelAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRChannelAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRChannelAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRChannelAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -58661,7 +58661,7 @@ new MTRChannelAttributeListListAttributeCallbackBridge(queue, completionHandler, } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; @@ -58672,34 +58672,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -58721,7 +58721,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; @@ -58732,36 +58732,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -58785,7 +58785,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -58804,7 +58804,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::TargetNavigatorCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -58821,8 +58821,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params - completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -58839,78 +58839,78 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams } new MTRTargetNavigatorClusterNavigateTargetResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeTargetListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTargetNavigatorTargetListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTargetListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTargetNavigatorTargetListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeCurrentTargetWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; @@ -58921,36 +58921,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentTargetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -58972,200 +58972,200 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTargetNavigatorAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTargetNavigatorAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; @@ -59176,34 +59176,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -59225,7 +59225,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; @@ -59236,36 +59236,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -59289,7 +59289,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -59308,7 +59308,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::MediaPlaybackCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -59325,13 +59325,13 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)playWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { [self playWithParams:nil completionHandler:completionHandler]; } - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -59343,22 +59343,22 @@ - (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params } new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)pauseWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { [self pauseWithParams:nil completionHandler:completionHandler]; } - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -59370,22 +59370,22 @@ - (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params } new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)stopPlaybackWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { [self stopPlaybackWithParams:nil completionHandler:completionHandler]; } - (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -59397,22 +59397,22 @@ - (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nul } new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)startOverWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { [self startOverWithParams:nil completionHandler:completionHandler]; } - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -59424,22 +59424,22 @@ - (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable) } new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)previousWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { [self previousWithParams:nil completionHandler:completionHandler]; } - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -59451,22 +59451,22 @@ - (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)pa } new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)nextWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { [self nextWithParams:nil completionHandler:completionHandler]; } - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -59478,22 +59478,22 @@ - (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params } new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)rewindWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { [self rewindWithParams:nil completionHandler:completionHandler]; } - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -59505,22 +59505,22 @@ - (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params } new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)fastForwardWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { [self fastForwardWithParams:nil completionHandler:completionHandler]; } - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -59532,17 +59532,17 @@ - (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nulla } new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -59555,17 +59555,17 @@ - (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -59578,17 +59578,17 @@ - (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)para request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params - completionHandler: - (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -59601,118 +59601,118 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params request.position = params.position.unsignedLongLongValue; new MTRMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeCurrentStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeStartTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeStartTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -59734,46 +59734,46 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeDurationWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -59795,71 +59795,71 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeSampledPositionWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSampledPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFloatAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; @@ -59870,36 +59870,36 @@ new MTRFloatAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRFloatAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePlaybackSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -59921,47 +59921,47 @@ new MTRFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSeekRangeEndWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -59983,48 +59983,48 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeSeekRangeStartWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSeekRangeStartWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -60046,200 +60046,200 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaPlaybackAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaPlaybackAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; @@ -60250,34 +60250,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -60299,7 +60299,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; @@ -60310,36 +60310,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -60363,7 +60363,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -60382,7 +60382,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::MediaInputCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -60412,15 +60412,15 @@ - (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params co new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)showInputStatusWithCompletionHandler:(StatusCompletion)completionHandler @@ -60428,7 +60428,7 @@ - (void)showInputStatusWithCompletionHandler:(StatusCompletion)completionHandler [self showInputStatusWithParams:nil completionHandler:completionHandler]; } - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -60441,15 +60441,15 @@ - (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _ new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)hideInputStatusWithCompletionHandler:(StatusCompletion)completionHandler @@ -60457,7 +60457,7 @@ - (void)hideInputStatusWithCompletionHandler:(StatusCompletion)completionHandler [self hideInputStatusWithParams:nil completionHandler:completionHandler]; } - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -60470,15 +60470,15 @@ - (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _ new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params completionHandler:(StatusCompletion)completionHandler @@ -60496,58 +60496,58 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params co new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeInputListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaInputInputListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRMediaInputInputListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaInputInputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaInputInputListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -60569,7 +60569,7 @@ new MTRMediaInputInputListListAttributeCallbackBridge(queue, completionHandler, } - (void)readAttributeCurrentInputWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; @@ -60580,35 +60580,35 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentInputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -60630,200 +60630,200 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRMediaInputGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaInputGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRMediaInputAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaInputAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaInputAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRMediaInputAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; @@ -60834,34 +60834,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -60883,7 +60883,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; @@ -60894,36 +60894,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -60947,7 +60947,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -60966,7 +60966,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::LowPowerCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -60999,212 +60999,212 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params comple new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRLowPowerGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLowPowerGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRLowPowerAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLowPowerAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLowPowerAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRLowPowerAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; @@ -61215,34 +61215,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -61264,7 +61264,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; @@ -61275,36 +61275,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -61328,7 +61328,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -61347,7 +61347,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::KeypadInputCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -61364,8 +61364,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params - completionHandler: - (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -61378,209 +61378,209 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params request.keyCode = static_cast>(params.keyCode.unsignedCharValue); new MTRKeypadInputClusterSendKeyResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRKeypadInputAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRKeypadInputAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; @@ -61591,34 +61591,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -61640,7 +61640,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; @@ -61651,36 +61651,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -61704,7 +61704,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -61723,7 +61723,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::ContentLauncherCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -61740,8 +61740,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params - completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -61767,7 +61767,7 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) } auto element_1 = (MTRContentLauncherClusterParameter *) params.search.parameterList[i_1]; listHolder_1->mList[i_1].type = static_castmList[i_1].type)>>( - element_1.type.unsignedCharValue); + element_1.type.unsignedCharValue); listHolder_1->mList[i_1].value = [self asCharSpan:element_1.value]; if (element_1.externalIDList != nil) { auto & definedValue_3 = listHolder_1->mList[i_1].externalIDList.Emplace(); @@ -61809,17 +61809,17 @@ - (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *) } new MTRContentLauncherClusterLaunchResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params - completionHandler: - (void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -61852,7 +61852,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params definedValue_4.width = params.brandingInformation.background.size.width.doubleValue; definedValue_4.height = params.brandingInformation.background.size.height.doubleValue; definedValue_4.metric = static_cast>( - params.brandingInformation.background.size.metric.unsignedCharValue); + params.brandingInformation.background.size.metric.unsignedCharValue); } } if (params.brandingInformation.logo != nil) { @@ -61870,7 +61870,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params definedValue_4.width = params.brandingInformation.logo.size.width.doubleValue; definedValue_4.height = params.brandingInformation.logo.size.height.doubleValue; definedValue_4.metric = static_cast>( - params.brandingInformation.logo.size.metric.unsignedCharValue); + params.brandingInformation.logo.size.metric.unsignedCharValue); } } if (params.brandingInformation.progressBar != nil) { @@ -61888,7 +61888,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params definedValue_4.width = params.brandingInformation.progressBar.size.width.doubleValue; definedValue_4.height = params.brandingInformation.progressBar.size.height.doubleValue; definedValue_4.metric = static_cast>( - params.brandingInformation.progressBar.size.metric.unsignedCharValue); + params.brandingInformation.progressBar.size.metric.unsignedCharValue); } } if (params.brandingInformation.splash != nil) { @@ -61906,7 +61906,7 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params definedValue_4.width = params.brandingInformation.splash.size.width.doubleValue; definedValue_4.height = params.brandingInformation.splash.size.height.doubleValue; definedValue_4.metric = static_cast>( - params.brandingInformation.splash.size.metric.unsignedCharValue); + params.brandingInformation.splash.size.metric.unsignedCharValue); } } if (params.brandingInformation.waterMark != nil) { @@ -61924,85 +61924,85 @@ - (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params definedValue_4.width = params.brandingInformation.waterMark.size.width.doubleValue; definedValue_4.height = params.brandingInformation.waterMark.size.height.doubleValue; definedValue_4.metric = static_cast>( - params.brandingInformation.waterMark.size.metric.unsignedCharValue); + params.brandingInformation.waterMark.size.metric.unsignedCharValue); } } } new MTRContentLauncherClusterLaunchResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeAcceptHeaderWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRContentLauncherAcceptHeaderListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRContentLauncherAcceptHeaderListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; @@ -62013,15 +62013,15 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -62032,53 +62032,53 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -62100,200 +62100,200 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRContentLauncherAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRContentLauncherAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; @@ -62304,34 +62304,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -62353,7 +62353,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; @@ -62364,36 +62364,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -62417,7 +62417,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -62436,7 +62436,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::AudioOutputCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -62453,7 +62453,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -62467,19 +62467,19 @@ - (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -62494,81 +62494,81 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeOutputListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAudioOutputOutputListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeOutputListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAudioOutputOutputListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeCurrentOutputWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; @@ -62579,36 +62579,36 @@ new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeCurrentOutputWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -62630,200 +62630,200 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAudioOutputAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAudioOutputAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; @@ -62834,34 +62834,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -62883,7 +62883,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; @@ -62894,36 +62894,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -62947,7 +62947,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -62966,7 +62966,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::ApplicationLauncherCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -62983,8 +62983,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)params - completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -63002,17 +63002,17 @@ - (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams *)para } new MTRApplicationLauncherClusterLauncherResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params - completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -63026,17 +63026,17 @@ - (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams *)params request.application.applicationId = [self asCharSpan:params.application.applicationId]; new MTRApplicationLauncherClusterLauncherResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params - completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -63050,98 +63050,98 @@ - (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams *)params request.application.applicationId = [self asCharSpan:params.application.applicationId]; new MTRApplicationLauncherClusterLauncherResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeCatalogListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationLauncherCatalogListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeCatalogListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationLauncherCatalogListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeCurrentAppWithCompletionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -63152,278 +63152,278 @@ - (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicat new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0.application.catalogVendorId = value.application.catalogVendorId.unsignedShortValue; - nonNullValue_0.application.applicationId = [self asCharSpan:value.application.applicationId]; - if (value.endpoint != nil) { - auto & definedValue_2 = nonNullValue_0.endpoint.Emplace(); - definedValue_2 = value.endpoint.unsignedShortValue; - } + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0.application.catalogVendorId = value.application.catalogVendorId.unsignedShortValue; + nonNullValue_0.application.applicationId = [self asCharSpan:value.application.applicationId]; + if (value.endpoint != nil) { + auto & definedValue_2 = nonNullValue_0.endpoint.Emplace(); + definedValue_2 = value.endpoint.unsignedShortValue; } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeCurrentAppWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationLauncherAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationLauncherAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; @@ -63434,34 +63434,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -63483,7 +63483,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; @@ -63494,36 +63494,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -63547,7 +63547,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -63566,7 +63566,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::ApplicationBasicCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -63583,7 +63583,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)readAttributeVendorNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; @@ -63594,34 +63594,34 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -63643,7 +63643,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeVendorIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; @@ -63654,34 +63654,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -63703,7 +63703,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeApplicationNameWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; @@ -63714,36 +63714,36 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeApplicationNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -63765,7 +63765,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeProductIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; @@ -63776,34 +63776,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -63828,131 +63828,131 @@ - (void)readAttributeApplicationWithCompletionHandler: (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationBasicApplicationStructAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeApplicationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRApplicationBasicApplicationStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationBasicClusterApplicationStatusEnumAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeApplicationVersionWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; @@ -63963,36 +63963,36 @@ new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, } - (void)subscribeAttributeApplicationVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -64014,264 +64014,264 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeAllowedVendorListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAllowedVendorListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationBasicAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRApplicationBasicAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; @@ -64282,34 +64282,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -64331,7 +64331,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; @@ -64342,36 +64342,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -64395,7 +64395,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -64414,7 +64414,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::AccountLoginCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -64431,8 +64431,8 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params - completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -64448,12 +64448,12 @@ - (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params request.tempAccountIdentifier = [self asCharSpan:params.tempAccountIdentifier]; new MTRAccountLoginClusterGetSetupPINResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completionHandler:(StatusCompletion)completionHandler @@ -64474,15 +64474,15 @@ - (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completionHa new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)logoutWithCompletionHandler:(StatusCompletion)completionHandler @@ -64490,7 +64490,7 @@ - (void)logoutWithCompletionHandler:(StatusCompletion)completionHandler [self logoutWithParams:nil completionHandler:completionHandler]; } - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -64506,212 +64506,212 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAccountLoginAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRAccountLoginAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; @@ -64722,34 +64722,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -64771,7 +64771,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; @@ -64782,36 +64782,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -64835,7 +64835,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -64854,7 +64854,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::ElectricalMeasurementCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -64875,7 +64875,7 @@ - (void)getProfileInfoCommandWithCompletionHandler:(StatusCompletion)completionH [self getProfileInfoCommandWithParams:nil completionHandler:completionHandler]; } - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -64888,19 +64888,19 @@ - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfi new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -64916,19 +64916,19 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeMeasurementTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; @@ -64939,36 +64939,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasurementTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -64990,7 +64990,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeDcVoltageWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; @@ -65001,34 +65001,34 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDcVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDcVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -65050,7 +65050,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeDcVoltageMinWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; @@ -65061,35 +65061,35 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDcVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDcVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -65111,7 +65111,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeDcVoltageMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; @@ -65122,35 +65122,35 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDcVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDcVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -65172,7 +65172,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeDcCurrentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; @@ -65183,34 +65183,34 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDcCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDcCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -65232,7 +65232,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeDcCurrentMinWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; @@ -65243,35 +65243,35 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDcCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDcCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -65293,7 +65293,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeDcCurrentMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; @@ -65304,35 +65304,35 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDcCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDcCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -65364,34 +65364,34 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDcPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDcPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -65413,7 +65413,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeDcPowerMinWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; @@ -65424,34 +65424,34 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDcPowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDcPowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -65473,7 +65473,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeDcPowerMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; @@ -65484,34 +65484,34 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDcPowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDcPowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -65533,7 +65533,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeDcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; @@ -65544,37 +65544,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -65596,7 +65596,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeDcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; @@ -65607,36 +65607,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -65658,7 +65658,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeDcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; @@ -65669,37 +65669,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -65721,7 +65721,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeDcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; @@ -65732,36 +65732,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -65783,7 +65783,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeDcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; @@ -65794,36 +65794,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -65845,7 +65845,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeDcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; @@ -65856,36 +65856,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeDcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeDcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -65907,7 +65907,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAcFrequencyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; @@ -65918,35 +65918,35 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAcFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -65968,7 +65968,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAcFrequencyMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; @@ -65979,36 +65979,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAcFrequencyMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcFrequencyMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -66030,7 +66030,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAcFrequencyMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; @@ -66041,36 +66041,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAcFrequencyMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcFrequencyMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -66092,7 +66092,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeNeutralCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; @@ -66103,36 +66103,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeNeutralCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNeutralCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -66154,7 +66154,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTotalActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; @@ -66165,36 +66165,36 @@ new MTRInt32sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTotalActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -66216,7 +66216,7 @@ new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTotalReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; @@ -66227,36 +66227,36 @@ new MTRInt32sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTotalReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTotalReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -66278,7 +66278,7 @@ new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeTotalApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; @@ -66289,36 +66289,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeTotalApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTotalApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -66340,7 +66340,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMeasured1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; @@ -66351,37 +66351,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -66403,7 +66403,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMeasured3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; @@ -66414,37 +66414,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -66466,7 +66466,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMeasured5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; @@ -66477,37 +66477,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -66529,7 +66529,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMeasured7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; @@ -66540,37 +66540,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -66592,7 +66592,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMeasured9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; @@ -66603,37 +66603,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -66655,7 +66655,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMeasured11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; @@ -66666,37 +66666,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -66718,7 +66718,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; @@ -66729,37 +66729,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -66781,7 +66781,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; @@ -66792,37 +66792,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -66844,7 +66844,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; @@ -66855,37 +66855,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -66907,7 +66907,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; @@ -66918,37 +66918,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -66970,7 +66970,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; @@ -66981,37 +66981,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -67033,7 +67033,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; @@ -67044,37 +67044,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -67096,7 +67096,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAcFrequencyMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; @@ -67107,37 +67107,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAcFrequencyMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcFrequencyMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -67159,7 +67159,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAcFrequencyDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; @@ -67170,36 +67170,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAcFrequencyDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcFrequencyDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -67221,7 +67221,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; @@ -67232,36 +67232,36 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -67283,7 +67283,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePowerDivisorWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; @@ -67294,35 +67294,35 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributePowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -67344,7 +67344,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; @@ -67355,37 +67355,37 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributeHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -67407,7 +67407,7 @@ new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; @@ -67418,37 +67418,37 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -67470,7 +67470,7 @@ new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeInstantaneousVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; @@ -67481,37 +67481,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeInstantaneousVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInstantaneousVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -67533,7 +67533,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeInstantaneousLineCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; @@ -67544,37 +67544,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeInstantaneousLineCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInstantaneousLineCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -67596,7 +67596,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeInstantaneousActiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; @@ -67607,37 +67607,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeInstantaneousActiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInstantaneousActiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -67659,7 +67659,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeInstantaneousReactiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; @@ -67670,37 +67670,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeInstantaneousReactiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -67722,7 +67722,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeInstantaneousPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; @@ -67733,36 +67733,36 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeInstantaneousPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInstantaneousPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -67784,7 +67784,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltageWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; @@ -67795,34 +67795,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -67844,7 +67844,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltageMinWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; @@ -67855,36 +67855,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -67906,7 +67906,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltageMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; @@ -67917,36 +67917,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -67968,7 +67968,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsCurrentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; @@ -67979,34 +67979,34 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -68028,7 +68028,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsCurrentMinWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; @@ -68039,36 +68039,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -68090,7 +68090,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsCurrentMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; @@ -68101,36 +68101,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -68152,7 +68152,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeActivePowerWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; @@ -68163,35 +68163,35 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -68213,7 +68213,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeActivePowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; @@ -68224,36 +68224,36 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActivePowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -68275,7 +68275,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeActivePowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; @@ -68286,36 +68286,36 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActivePowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -68337,7 +68337,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeReactivePowerWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; @@ -68348,36 +68348,36 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -68399,7 +68399,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeApparentPowerWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; @@ -68410,36 +68410,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -68461,7 +68461,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePowerFactorWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; @@ -68472,35 +68472,35 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributePowerFactorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePowerFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -68522,7 +68522,7 @@ new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; @@ -68533,15 +68533,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -68552,53 +68552,53 @@ - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _N new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -68620,7 +68620,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAverageRmsUnderVoltageCounterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; @@ -68631,15 +68631,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -68650,53 +68650,53 @@ - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnul new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -68718,7 +68718,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; @@ -68729,15 +68729,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -68748,53 +68748,53 @@ - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull) new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -68816,7 +68816,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; @@ -68827,15 +68827,15 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -68846,53 +68846,53 @@ - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -68914,7 +68914,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltageSagPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; @@ -68929,8 +68929,8 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value co [self writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -68941,53 +68941,53 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeRmsVoltageSagPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltageSagPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -69009,7 +69009,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltageSwellPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; @@ -69020,13 +69020,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -69037,53 +69037,53 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeRmsVoltageSwellPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -69105,7 +69105,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; @@ -69116,37 +69116,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -69168,7 +69168,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; @@ -69179,36 +69179,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -69230,7 +69230,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; @@ -69241,37 +69241,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -69293,7 +69293,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; @@ -69304,36 +69304,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -69355,7 +69355,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; @@ -69366,36 +69366,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -69417,7 +69417,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; @@ -69428,36 +69428,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -69479,7 +69479,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; @@ -69494,8 +69494,8 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value com [self writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -69506,52 +69506,52 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -69573,7 +69573,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; @@ -69584,36 +69584,36 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -69635,7 +69635,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; @@ -69646,36 +69646,36 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -69697,7 +69697,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAcOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; @@ -69712,8 +69712,8 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value c [self writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -69724,53 +69724,53 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeAcOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -69792,7 +69792,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAcVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; @@ -69803,36 +69803,36 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAcVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -69854,7 +69854,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAcCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; @@ -69865,36 +69865,36 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAcCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -69916,7 +69916,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAcActivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; @@ -69927,37 +69927,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAcActivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcActivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -69979,7 +69979,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAcReactivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; @@ -69990,37 +69990,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAcReactivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcReactivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -70042,7 +70042,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAverageRmsOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; @@ -70053,37 +70053,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAverageRmsOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAverageRmsOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -70105,7 +70105,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAverageRmsUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; @@ -70116,37 +70116,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAverageRmsUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAverageRmsUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -70168,7 +70168,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsExtremeOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; @@ -70179,37 +70179,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsExtremeOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsExtremeOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -70231,7 +70231,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsExtremeUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; @@ -70242,37 +70242,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsExtremeUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -70294,7 +70294,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltageSagWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; @@ -70305,36 +70305,36 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsVoltageSagWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltageSagWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -70356,7 +70356,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltageSwellWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; @@ -70367,36 +70367,36 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsVoltageSwellWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltageSwellWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -70418,7 +70418,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeLineCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; @@ -70429,36 +70429,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeLineCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLineCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -70480,7 +70480,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeActiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; @@ -70491,37 +70491,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeActiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -70543,7 +70543,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeReactiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; @@ -70554,37 +70554,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeReactiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeReactiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -70606,7 +70606,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltagePhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; @@ -70617,36 +70617,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsVoltagePhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltagePhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -70668,7 +70668,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltageMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; @@ -70679,37 +70679,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsVoltageMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -70731,7 +70731,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltageMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; @@ -70742,37 +70742,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -70794,7 +70794,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; @@ -70805,36 +70805,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -70856,7 +70856,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsCurrentMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; @@ -70867,37 +70867,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -70919,7 +70919,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsCurrentMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; @@ -70930,37 +70930,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -70982,7 +70982,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeActivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; @@ -70993,36 +70993,36 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeActivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -71044,7 +71044,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeActivePowerMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; @@ -71055,37 +71055,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeActivePowerMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActivePowerMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -71107,7 +71107,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeActivePowerMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; @@ -71118,37 +71118,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeActivePowerMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActivePowerMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -71170,7 +71170,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeReactivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; @@ -71181,37 +71181,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeReactivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeReactivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -71233,7 +71233,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeApparentPowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; @@ -71244,37 +71244,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeApparentPowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -71296,7 +71296,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePowerFactorPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; @@ -71307,36 +71307,36 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributePowerFactorPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePowerFactorPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -71358,7 +71358,7 @@ new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; @@ -71369,38 +71369,38 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -71422,7 +71422,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; @@ -71433,37 +71433,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -71485,7 +71485,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; @@ -71496,37 +71496,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -71548,7 +71548,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; @@ -71559,37 +71559,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -71611,7 +71611,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; @@ -71622,37 +71622,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -71674,7 +71674,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; @@ -71685,37 +71685,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -71737,7 +71737,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; @@ -71748,37 +71748,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -71800,7 +71800,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeLineCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; @@ -71811,36 +71811,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeLineCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLineCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -71862,7 +71862,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeActiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; @@ -71873,37 +71873,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeActiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -71925,7 +71925,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeReactiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; @@ -71936,37 +71936,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeReactiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeReactiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -71988,7 +71988,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltagePhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; @@ -71999,36 +71999,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsVoltagePhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltagePhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -72050,7 +72050,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltageMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; @@ -72061,37 +72061,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsVoltageMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -72113,7 +72113,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltageMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; @@ -72124,37 +72124,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -72176,7 +72176,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; @@ -72187,36 +72187,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -72238,7 +72238,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsCurrentMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; @@ -72249,37 +72249,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -72301,7 +72301,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsCurrentMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; @@ -72312,37 +72312,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -72364,7 +72364,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeActivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; @@ -72375,36 +72375,36 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeActivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -72426,7 +72426,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeActivePowerMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; @@ -72437,37 +72437,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeActivePowerMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActivePowerMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -72489,7 +72489,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeActivePowerMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; @@ -72500,37 +72500,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeActivePowerMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeActivePowerMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -72552,7 +72552,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeReactivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; @@ -72563,37 +72563,37 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeReactivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeReactivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -72615,7 +72615,7 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeApparentPowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; @@ -72626,37 +72626,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeApparentPowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeApparentPowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -72678,7 +72678,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributePowerFactorPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; @@ -72689,36 +72689,36 @@ new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Can } - (void)subscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -72740,7 +72740,7 @@ new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; @@ -72751,38 +72751,38 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -72804,7 +72804,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; @@ -72815,37 +72815,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -72867,7 +72867,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; @@ -72878,37 +72878,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -72930,7 +72930,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; @@ -72941,37 +72941,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -72993,7 +72993,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; @@ -73004,37 +73004,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -73056,7 +73056,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; @@ -73067,37 +73067,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -73119,7 +73119,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; @@ -73130,37 +73130,37 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -73182,200 +73182,200 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRElectricalMeasurementAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRElectricalMeasurementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; @@ -73386,34 +73386,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -73435,7 +73435,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; @@ -73446,36 +73446,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -73499,7 +73499,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } @@ -73518,7 +73518,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q } // Must allocate cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { *[self cppClusterSlot] = new chip::Controller::TestClusterCluster( *[device internalDevice]->GetExchangeManager(), [device internalDevice]->GetSecureSession().Value(), endpoint); }); @@ -73551,15 +73551,15 @@ - (void)testWithParams:(MTRTestClusterClusterTestParams * _Nullable)params compl new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testNotHandledWithCompletionHandler:(StatusCompletion)completionHandler @@ -73567,7 +73567,7 @@ - (void)testNotHandledWithCompletionHandler:(StatusCompletion)completionHandler [self testNotHandledWithParams:nil completionHandler:completionHandler]; } - (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -73580,25 +73580,25 @@ - (void)testNotHandledWithParams:(MTRTestClusterClusterTestNotHandledParams * _N new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testSpecificWithCompletionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { [self testSpecificWithParams:nil completionHandler:completionHandler]; } - (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nullable)params - completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -73610,12 +73610,12 @@ - (void)testSpecificWithParams:(MTRTestClusterClusterTestSpecificParams * _Nulla } new MTRTestClusterClusterTestSpecificResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testUnknownCommandWithCompletionHandler:(StatusCompletion)completionHandler @@ -73623,7 +73623,7 @@ - (void)testUnknownCommandWithCompletionHandler:(StatusCompletion)completionHand [self testUnknownCommandWithParams:nil completionHandler:completionHandler]; } - (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -73636,20 +73636,20 @@ - (void)testUnknownCommandWithParams:(MTRTestClusterClusterTestUnknownCommandPar new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams *)params - completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -73663,17 +73663,17 @@ - (void)testAddArgumentsWithParams:(MTRTestClusterClusterTestAddArgumentsParams request.arg2 = params.arg2.unsignedCharValue; new MTRTestClusterClusterTestAddArgumentsResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -73686,18 +73686,18 @@ - (void)testSimpleArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleArgu request.arg1 = params.arg1.boolValue; new MTRTestClusterClusterTestSimpleArgumentResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStructArrayArgumentRequestParams *)params - completionHandler: - (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -73752,11 +73752,11 @@ - (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStruc listHolder_2->mList[i_2].a = element_2.a.unsignedCharValue; listHolder_2->mList[i_2].b = element_2.b.boolValue; listHolder_2->mList[i_2].c = static_castmList[i_2].c)>>( - element_2.c.unsignedCharValue); + element_2.c.unsignedCharValue); listHolder_2->mList[i_2].d = [self asByteSpan:element_2.d]; listHolder_2->mList[i_2].e = [self asCharSpan:element_2.e]; listHolder_2->mList[i_2].f = static_castmList[i_2].f)>>( - element_2.f.unsignedCharValue); + element_2.f.unsignedCharValue); listHolder_2->mList[i_2].g = element_2.g.floatValue; listHolder_2->mList[i_2].h = element_2.h.doubleValue; } @@ -73917,17 +73917,17 @@ - (void)testStructArrayArgumentRequestWithParams:(MTRTestClusterClusterTestStruc request.arg6 = params.arg6.boolValue; new MTRTestClusterClusterTestStructArrayArgumentResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -73947,17 +73947,17 @@ - (void)testStructArgumentRequestWithParams:(MTRTestClusterClusterTestStructArgu request.arg1.h = params.arg1.h.doubleValue; new MTRTestClusterClusterBooleanResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -73979,17 +73979,17 @@ - (void)testNestedStructArgumentRequestWithParams:(MTRTestClusterClusterTestNest request.arg1.c.h = params.arg1.c.h.doubleValue; new MTRTestClusterClusterBooleanResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListStructArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -74032,17 +74032,17 @@ - (void)testListStructArgumentRequestWithParams:(MTRTestClusterClusterTestListSt } new MTRTestClusterClusterBooleanResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt8UArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -74076,17 +74076,17 @@ - (void)testListInt8UArgumentRequestWithParams:(MTRTestClusterClusterTestListInt } new MTRTestClusterClusterBooleanResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTestNestedStructListArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -74205,18 +74205,18 @@ - (void)testNestedStructListArgumentRequestWithParams:(MTRTestClusterClusterTest } new MTRTestClusterClusterBooleanResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testListNestedStructListArgumentRequestWithParams: - (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + (MTRTestClusterClusterTestListNestedStructListArgumentRequestParams *)params + completionHandler:(void (^)(MTRTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -74271,11 +74271,11 @@ - (void)testListNestedStructListArgumentRequestWithParams: listHolder_2->mList[i_2].a = element_2.a.unsignedCharValue; listHolder_2->mList[i_2].b = element_2.b.boolValue; listHolder_2->mList[i_2].c = static_castmList[i_2].c)>>( - element_2.c.unsignedCharValue); + element_2.c.unsignedCharValue); listHolder_2->mList[i_2].d = [self asByteSpan:element_2.d]; listHolder_2->mList[i_2].e = [self asCharSpan:element_2.e]; listHolder_2->mList[i_2].f = static_castmList[i_2].f)>>( - element_2.f.unsignedCharValue); + element_2.f.unsignedCharValue); listHolder_2->mList[i_2].g = element_2.g.floatValue; listHolder_2->mList[i_2].h = element_2.h.doubleValue; } @@ -74358,17 +74358,17 @@ - (void)testListNestedStructListArgumentRequestWithParams: } new MTRTestClusterClusterBooleanResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8UReverseRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -74402,17 +74402,17 @@ - (void)testListInt8UReverseRequestWithParams:(MTRTestClusterClusterTestListInt8 } new MTRTestClusterClusterTestListInt8UReverseResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRTestClusterClusterTestEnumsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -74426,17 +74426,17 @@ - (void)testEnumsRequestWithParams:(MTRTestClusterClusterTestEnumsRequestParams request.arg2 = static_cast>(params.arg2.unsignedCharValue); new MTRTestClusterClusterTestEnumsResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params - completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -74459,18 +74459,18 @@ - (void)testNullableOptionalRequestWithParams:(MTRTestClusterClusterTestNullable } new MTRTestClusterClusterTestNullableOptionalResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestComplexNullableOptionalRequestParams *)params - completionHandler: - (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler: + (void (^)(MTRTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -74555,11 +74555,11 @@ - (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestC nonNullValue_1.a = params.nullableOptionalStruct.a.unsignedCharValue; nonNullValue_1.b = params.nullableOptionalStruct.b.boolValue; nonNullValue_1.c = static_cast>( - params.nullableOptionalStruct.c.unsignedCharValue); + params.nullableOptionalStruct.c.unsignedCharValue); nonNullValue_1.d = [self asByteSpan:params.nullableOptionalStruct.d]; nonNullValue_1.e = [self asCharSpan:params.nullableOptionalStruct.e]; nonNullValue_1.f = static_cast>( - params.nullableOptionalStruct.f.unsignedCharValue); + params.nullableOptionalStruct.f.unsignedCharValue); nonNullValue_1.g = params.nullableOptionalStruct.g.floatValue; nonNullValue_1.h = params.nullableOptionalStruct.h.doubleValue; } @@ -74651,17 +74651,17 @@ - (void)testComplexNullableOptionalRequestWithParams:(MTRTestClusterClusterTestC } new MTRTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEchoRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRTestClusterClusterSimpleStructResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -74681,12 +74681,12 @@ - (void)simpleStructEchoRequestWithParams:(MTRTestClusterClusterSimpleStructEcho request.arg1.h = params.arg1.h.doubleValue; new MTRTestClusterClusterSimpleStructResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)timedInvokeRequestWithCompletionHandler:(StatusCompletion)completionHandler @@ -74694,7 +74694,7 @@ - (void)timedInvokeRequestWithCompletionHandler:(StatusCompletion)completionHand [self timedInvokeRequestWithParams:nil completionHandler:completionHandler]; } - (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -74710,19 +74710,19 @@ - (void)timedInvokeRequestWithParams:(MTRTestClusterClusterTimedInvokeRequestPar new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -74741,20 +74741,20 @@ - (void)testSimpleOptionalArgumentRequestWithParams:(MTRTestClusterClusterTestSi new MTRCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEventRequestParams *)params - completionHandler:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler:(void (^)(MTRTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -74769,19 +74769,19 @@ - (void)testEmitTestEventRequestWithParams:(MTRTestClusterClusterTestEmitTestEve request.arg3 = params.arg3.boolValue; new MTRTestClusterClusterTestEmitTestEventResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params - completionHandler: - (void (^)( - MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + completionHandler: + (void (^)( + MTRTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; @@ -74794,12 +74794,12 @@ - (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTes request.arg1 = params.arg1.unsignedCharValue; new MTRTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler @@ -74817,8 +74817,8 @@ - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completionHand [self writeAttributeBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -74829,50 +74829,50 @@ - (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -74896,12 +74896,12 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterBitmap8AttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -74909,8 +74909,8 @@ - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completionHand [self writeAttributeBitmap8WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -74921,50 +74921,50 @@ - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterBitmap8AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -74986,15 +74986,15 @@ new MTRTestClusterBitmap8AttributeCallbackBridge(queue, completionHandler, ^(Can } - (void)readAttributeBitmap16WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterBitmap16AttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -75002,8 +75002,8 @@ - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completionHan [self writeAttributeBitmap16WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -75014,50 +75014,50 @@ - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedShortValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterBitmap16AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -75079,15 +75079,15 @@ new MTRTestClusterBitmap16AttributeCallbackBridge(queue, completionHandler, ^(Ca } - (void)readAttributeBitmap32WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterBitmap32AttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -75095,8 +75095,8 @@ - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completionHan [self writeAttributeBitmap32WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -75107,50 +75107,50 @@ - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedIntValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedIntValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterBitmap32AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -75172,15 +75172,15 @@ new MTRTestClusterBitmap32AttributeCallbackBridge(queue, completionHandler, ^(Ca } - (void)readAttributeBitmap64WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterBitmap64AttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -75188,8 +75188,8 @@ - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completionHan [self writeAttributeBitmap64WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -75200,50 +75200,50 @@ - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedLongLongValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedLongLongValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterBitmap64AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -75279,8 +75279,8 @@ - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completionHandle [self writeAttributeInt8uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -75291,50 +75291,50 @@ - (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -75370,8 +75370,8 @@ - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeInt16uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -75382,50 +75382,50 @@ - (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -75461,8 +75461,8 @@ - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeInt24uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -75473,50 +75473,50 @@ - (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -75552,8 +75552,8 @@ - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeInt32uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -75564,50 +75564,50 @@ - (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -75643,8 +75643,8 @@ - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeInt40uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -75655,50 +75655,50 @@ - (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -75734,8 +75734,8 @@ - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeInt48uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -75746,50 +75746,50 @@ - (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -75825,8 +75825,8 @@ - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeInt56uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -75837,50 +75837,50 @@ - (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -75916,8 +75916,8 @@ - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeInt64uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -75928,50 +75928,50 @@ - (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -76007,8 +76007,8 @@ - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completionHandle [self writeAttributeInt8sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -76019,50 +76019,50 @@ - (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.charValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -76098,8 +76098,8 @@ - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeInt16sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -76110,50 +76110,50 @@ - (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -76189,8 +76189,8 @@ - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeInt24sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -76201,50 +76201,50 @@ - (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.intValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.intValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -76280,8 +76280,8 @@ - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeInt32sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -76292,50 +76292,50 @@ - (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.intValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.intValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -76371,8 +76371,8 @@ - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeInt40sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -76383,50 +76383,50 @@ - (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.longLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.longLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -76462,8 +76462,8 @@ - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeInt48sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -76474,50 +76474,50 @@ - (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.longLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.longLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -76553,8 +76553,8 @@ - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeInt56sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -76565,50 +76565,50 @@ - (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.longLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.longLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -76644,8 +76644,8 @@ - (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeInt64sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -76656,50 +76656,50 @@ - (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.longLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.longLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -76735,8 +76735,8 @@ - (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completionHandle [self writeAttributeEnum8WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -76747,50 +76747,50 @@ - (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -76826,8 +76826,8 @@ - (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeEnum16WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -76838,50 +76838,50 @@ - (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -76903,7 +76903,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeFloatSingleWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFloatAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; @@ -76918,8 +76918,8 @@ - (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completion [self writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -76930,51 +76930,51 @@ - (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.floatValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.floatValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRFloatAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -76996,7 +76996,7 @@ new MTRFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeFloatDoubleWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDoubleAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; @@ -77011,8 +77011,8 @@ - (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completion [self writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -77023,51 +77023,51 @@ - (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.doubleValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.doubleValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRDoubleAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRDoubleAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -77089,7 +77089,7 @@ new MTRDoubleAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeOctetStringWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler + NSData * _Nullable value, NSError * _Nullable error))completionHandler { new MTROctetStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; @@ -77104,8 +77104,8 @@ - (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completionHa [self writeAttributeOctetStringWithValue:(NSData * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -77116,50 +77116,50 @@ - (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asByteSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asByteSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { new MTROctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { new MTROctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -77181,15 +77181,15 @@ new MTROctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeListInt8uWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterListInt8uListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -77197,8 +77197,8 @@ - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completionHan [self writeAttributeListInt8uWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -77209,71 +77209,71 @@ - (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeListInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeListInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterListInt8uListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -77295,15 +77295,15 @@ new MTRTestClusterListInt8uListAttributeCallbackBridge(queue, completionHandler, } - (void)readAttributeListOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTestClusterListOctetStringListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -77311,8 +77311,8 @@ - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value complet [self writeAttributeListOctetStringWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -77323,104 +77323,104 @@ - (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSData class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSData *) value[i_0]; - listHolder_0->mList[i_0] = [self asByteSpan:element_0]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSData *) value[i_0]; + listHolder_0->mList[i_0] = [self asByteSpan:element_0]; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeListOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeListOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterListOctetStringListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeListStructOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTestClusterListStructOctetStringListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -77428,8 +77428,8 @@ - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value c [self writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -77440,98 +77440,98 @@ - (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRTestClusterClusterTestListStructOctet class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRTestClusterClusterTestListStructOctet class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTestClusterClusterTestListStructOctet *) value[i_0]; - listHolder_0->mList[i_0].member1 = element_0.member1.unsignedLongLongValue; - listHolder_0->mList[i_0].member2 = [self asByteSpan:element_0.member2]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (MTRTestClusterClusterTestListStructOctet *) value[i_0]; + listHolder_0->mList[i_0].member1 = element_0.member1.unsignedLongLongValue; + listHolder_0->mList[i_0].member2 = [self asByteSpan:element_0.member2]; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeListStructOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeListStructOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterListStructOctetStringListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeLongOctetStringWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler + NSData * _Nullable value, NSError * _Nullable error))completionHandler { new MTROctetStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; @@ -77546,8 +77546,8 @@ - (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completi [self writeAttributeLongOctetStringWithValue:(NSData * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -77558,52 +77558,52 @@ - (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asByteSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asByteSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { new MTROctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTROctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { new MTROctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -77625,7 +77625,7 @@ new MTROctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeCharStringWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; @@ -77640,8 +77640,8 @@ - (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completionH [self writeAttributeCharStringWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -77652,50 +77652,50 @@ - (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -77717,7 +77717,7 @@ new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable } - (void)readAttributeLongCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; @@ -77732,8 +77732,8 @@ - (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value complet [self writeAttributeLongCharStringWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -77744,52 +77744,52 @@ - (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeLongCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeLongCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -77825,8 +77825,8 @@ - (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completionHand [self writeAttributeEpochUsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -77837,50 +77837,50 @@ - (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeEpochUsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeEpochUsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -77916,8 +77916,8 @@ - (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completionHandl [self writeAttributeEpochSWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -77928,50 +77928,50 @@ - (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeEpochSWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeEpochSWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -77993,7 +77993,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeVendorIdWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRVendorIdAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; @@ -78008,8 +78008,8 @@ - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completionHan [self writeAttributeVendorIdWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -78020,50 +78020,50 @@ - (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedShortValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRVendorIdAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -78085,27 +78085,27 @@ new MTRVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * } - (void)readAttributeListNullablesAndOptionalsStructWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -78116,277 +78116,277 @@ - (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnu new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRTestClusterClusterNullablesAndOptionalsStruct class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRTestClusterClusterNullablesAndOptionalsStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTestClusterClusterNullablesAndOptionalsStruct *) value[i_0]; - if (element_0.nullableInt == nil) { - listHolder_0->mList[i_0].nullableInt.SetNull(); + auto element_0 = (MTRTestClusterClusterNullablesAndOptionalsStruct *) value[i_0]; + if (element_0.nullableInt == nil) { + listHolder_0->mList[i_0].nullableInt.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableInt.SetNonNull(); + nonNullValue_2 = element_0.nullableInt.unsignedShortValue; + } + if (element_0.optionalInt != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].optionalInt.Emplace(); + definedValue_2 = element_0.optionalInt.unsignedShortValue; + } + if (element_0.nullableOptionalInt != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalInt.Emplace(); + if (element_0.nullableOptionalInt == nil) { + definedValue_2.SetNull(); } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableInt.SetNonNull(); - nonNullValue_2 = element_0.nullableInt.unsignedShortValue; - } - if (element_0.optionalInt != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalInt.Emplace(); - definedValue_2 = element_0.optionalInt.unsignedShortValue; - } - if (element_0.nullableOptionalInt != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalInt.Emplace(); - if (element_0.nullableOptionalInt == nil) { - definedValue_2.SetNull(); - } else { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - nonNullValue_3 = element_0.nullableOptionalInt.unsignedShortValue; - } + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = element_0.nullableOptionalInt.unsignedShortValue; } - if (element_0.nullableString == nil) { - listHolder_0->mList[i_0].nullableString.SetNull(); + } + if (element_0.nullableString == nil) { + listHolder_0->mList[i_0].nullableString.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableString.SetNonNull(); + nonNullValue_2 = [self asCharSpan:element_0.nullableString]; + } + if (element_0.optionalString != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].optionalString.Emplace(); + definedValue_2 = [self asCharSpan:element_0.optionalString]; + } + if (element_0.nullableOptionalString != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalString.Emplace(); + if (element_0.nullableOptionalString == nil) { + definedValue_2.SetNull(); } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableString.SetNonNull(); - nonNullValue_2 = [self asCharSpan:element_0.nullableString]; + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = [self asCharSpan:element_0.nullableOptionalString]; } - if (element_0.optionalString != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalString.Emplace(); - definedValue_2 = [self asCharSpan:element_0.optionalString]; - } - if (element_0.nullableOptionalString != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalString.Emplace(); - if (element_0.nullableOptionalString == nil) { - definedValue_2.SetNull(); - } else { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - nonNullValue_3 = [self asCharSpan:element_0.nullableOptionalString]; - } - } - if (element_0.nullableStruct == nil) { - listHolder_0->mList[i_0].nullableStruct.SetNull(); + } + if (element_0.nullableStruct == nil) { + listHolder_0->mList[i_0].nullableStruct.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableStruct.SetNonNull(); + nonNullValue_2.a = element_0.nullableStruct.a.unsignedCharValue; + nonNullValue_2.b = element_0.nullableStruct.b.boolValue; + nonNullValue_2.c = static_cast>( + element_0.nullableStruct.c.unsignedCharValue); + nonNullValue_2.d = [self asByteSpan:element_0.nullableStruct.d]; + nonNullValue_2.e = [self asCharSpan:element_0.nullableStruct.e]; + nonNullValue_2.f = static_cast>( + element_0.nullableStruct.f.unsignedCharValue); + nonNullValue_2.g = element_0.nullableStruct.g.floatValue; + nonNullValue_2.h = element_0.nullableStruct.h.doubleValue; + } + if (element_0.optionalStruct != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].optionalStruct.Emplace(); + definedValue_2.a = element_0.optionalStruct.a.unsignedCharValue; + definedValue_2.b = element_0.optionalStruct.b.boolValue; + definedValue_2.c = static_cast>( + element_0.optionalStruct.c.unsignedCharValue); + definedValue_2.d = [self asByteSpan:element_0.optionalStruct.d]; + definedValue_2.e = [self asCharSpan:element_0.optionalStruct.e]; + definedValue_2.f = static_cast>( + element_0.optionalStruct.f.unsignedCharValue); + definedValue_2.g = element_0.optionalStruct.g.floatValue; + definedValue_2.h = element_0.optionalStruct.h.doubleValue; + } + if (element_0.nullableOptionalStruct != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalStruct.Emplace(); + if (element_0.nullableOptionalStruct == nil) { + definedValue_2.SetNull(); } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableStruct.SetNonNull(); - nonNullValue_2.a = element_0.nullableStruct.a.unsignedCharValue; - nonNullValue_2.b = element_0.nullableStruct.b.boolValue; - nonNullValue_2.c = static_cast>( - element_0.nullableStruct.c.unsignedCharValue); - nonNullValue_2.d = [self asByteSpan:element_0.nullableStruct.d]; - nonNullValue_2.e = [self asCharSpan:element_0.nullableStruct.e]; - nonNullValue_2.f = static_cast>( - element_0.nullableStruct.f.unsignedCharValue); - nonNullValue_2.g = element_0.nullableStruct.g.floatValue; - nonNullValue_2.h = element_0.nullableStruct.h.doubleValue; - } - if (element_0.optionalStruct != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalStruct.Emplace(); - definedValue_2.a = element_0.optionalStruct.a.unsignedCharValue; - definedValue_2.b = element_0.optionalStruct.b.boolValue; - definedValue_2.c = static_cast>( - element_0.optionalStruct.c.unsignedCharValue); - definedValue_2.d = [self asByteSpan:element_0.optionalStruct.d]; - definedValue_2.e = [self asCharSpan:element_0.optionalStruct.e]; - definedValue_2.f = static_cast>( - element_0.optionalStruct.f.unsignedCharValue); - definedValue_2.g = element_0.optionalStruct.g.floatValue; - definedValue_2.h = element_0.optionalStruct.h.doubleValue; + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3.a = element_0.nullableOptionalStruct.a.unsignedCharValue; + nonNullValue_3.b = element_0.nullableOptionalStruct.b.boolValue; + nonNullValue_3.c = static_cast>( + element_0.nullableOptionalStruct.c.unsignedCharValue); + nonNullValue_3.d = [self asByteSpan:element_0.nullableOptionalStruct.d]; + nonNullValue_3.e = [self asCharSpan:element_0.nullableOptionalStruct.e]; + nonNullValue_3.f = static_cast>( + element_0.nullableOptionalStruct.f.unsignedCharValue); + nonNullValue_3.g = element_0.nullableOptionalStruct.g.floatValue; + nonNullValue_3.h = element_0.nullableOptionalStruct.h.doubleValue; } - if (element_0.nullableOptionalStruct != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalStruct.Emplace(); - if (element_0.nullableOptionalStruct == nil) { - definedValue_2.SetNull(); + } + if (element_0.nullableList == nil) { + listHolder_0->mList[i_0].nullableList.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableList.SetNonNull(); + { + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; + if (element_0.nullableList.count != 0) { + auto * listHolder_3 = new ListHolder(element_0.nullableList.count); + if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_3); + for (size_t i_3 = 0; i_3 < element_0.nullableList.count; ++i_3) { + if (![element_0.nullableList[i_3] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_3 = (NSNumber *) element_0.nullableList[i_3]; + listHolder_3->mList[i_3] + = static_castmList[i_3])>>( + element_3.unsignedCharValue); + } + nonNullValue_2 = ListType_3(listHolder_3->mList, element_0.nullableList.count); } else { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - nonNullValue_3.a = element_0.nullableOptionalStruct.a.unsignedCharValue; - nonNullValue_3.b = element_0.nullableOptionalStruct.b.boolValue; - nonNullValue_3.c = static_cast>( - element_0.nullableOptionalStruct.c.unsignedCharValue); - nonNullValue_3.d = [self asByteSpan:element_0.nullableOptionalStruct.d]; - nonNullValue_3.e = [self asCharSpan:element_0.nullableOptionalStruct.e]; - nonNullValue_3.f = static_cast>( - element_0.nullableOptionalStruct.f.unsignedCharValue); - nonNullValue_3.g = element_0.nullableOptionalStruct.g.floatValue; - nonNullValue_3.h = element_0.nullableOptionalStruct.h.doubleValue; + nonNullValue_2 = ListType_3(); } } - if (element_0.nullableList == nil) { - listHolder_0->mList[i_0].nullableList.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableList.SetNonNull(); - { - using ListType_3 = std::remove_reference_t; - using ListMemberType_3 = ListMemberTypeGetter::Type; - if (element_0.nullableList.count != 0) { - auto * listHolder_3 = new ListHolder(element_0.nullableList.count); - if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { + } + if (element_0.optionalList != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].optionalList.Emplace(); + { + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; + if (element_0.optionalList.count != 0) { + auto * listHolder_3 = new ListHolder(element_0.optionalList.count); + if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_3); + for (size_t i_3 = 0; i_3 < element_0.optionalList.count; ++i_3) { + if (![element_0.optionalList[i_3] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_3); - for (size_t i_3 = 0; i_3 < element_0.nullableList.count; ++i_3) { - if (![element_0.nullableList[i_3] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_3 = (NSNumber *) element_0.nullableList[i_3]; - listHolder_3->mList[i_3] - = static_castmList[i_3])>>( - element_3.unsignedCharValue); - } - nonNullValue_2 = ListType_3(listHolder_3->mList, element_0.nullableList.count); - } else { - nonNullValue_2 = ListType_3(); + auto element_3 = (NSNumber *) element_0.optionalList[i_3]; + listHolder_3->mList[i_3] + = static_castmList[i_3])>>( + element_3.unsignedCharValue); } + definedValue_2 = ListType_3(listHolder_3->mList, element_0.optionalList.count); + } else { + definedValue_2 = ListType_3(); } } - if (element_0.optionalList != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalList.Emplace(); + } + if (element_0.nullableOptionalList != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalList.Emplace(); + if (element_0.nullableOptionalList == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); { - using ListType_3 = std::remove_reference_t; - using ListMemberType_3 = ListMemberTypeGetter::Type; - if (element_0.optionalList.count != 0) { - auto * listHolder_3 = new ListHolder(element_0.optionalList.count); - if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { + using ListType_4 = std::remove_reference_t; + using ListMemberType_4 = ListMemberTypeGetter::Type; + if (element_0.nullableOptionalList.count != 0) { + auto * listHolder_4 + = new ListHolder(element_0.nullableOptionalList.count); + if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_3); - for (size_t i_3 = 0; i_3 < element_0.optionalList.count; ++i_3) { - if (![element_0.optionalList[i_3] isKindOfClass:[NSNumber class]]) { + listFreer.add(listHolder_4); + for (size_t i_4 = 0; i_4 < element_0.nullableOptionalList.count; ++i_4) { + if (![element_0.nullableOptionalList[i_4] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_3 = (NSNumber *) element_0.optionalList[i_3]; - listHolder_3->mList[i_3] - = static_castmList[i_3])>>( - element_3.unsignedCharValue); + auto element_4 = (NSNumber *) element_0.nullableOptionalList[i_4]; + listHolder_4->mList[i_4] + = static_castmList[i_4])>>( + element_4.unsignedCharValue); } - definedValue_2 = ListType_3(listHolder_3->mList, element_0.optionalList.count); + nonNullValue_3 = ListType_4(listHolder_4->mList, element_0.nullableOptionalList.count); } else { - definedValue_2 = ListType_3(); - } - } - } - if (element_0.nullableOptionalList != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalList.Emplace(); - if (element_0.nullableOptionalList == nil) { - definedValue_2.SetNull(); - } else { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - { - using ListType_4 = std::remove_reference_t; - using ListMemberType_4 = ListMemberTypeGetter::Type; - if (element_0.nullableOptionalList.count != 0) { - auto * listHolder_4 - = new ListHolder(element_0.nullableOptionalList.count); - if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_4); - for (size_t i_4 = 0; i_4 < element_0.nullableOptionalList.count; ++i_4) { - if (![element_0.nullableOptionalList[i_4] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_4 = (NSNumber *) element_0.nullableOptionalList[i_4]; - listHolder_4->mList[i_4] - = static_castmList[i_4])>>( - element_4.unsignedCharValue); - } - nonNullValue_3 = ListType_4(listHolder_4->mList, element_0.nullableOptionalList.count); - } else { - nonNullValue_3 = ListType_4(); - } + nonNullValue_3 = ListType_4(); } } } } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeListNullablesAndOptionalsStructWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeListNullablesAndOptionalsStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeEnumAttrWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterClusterSimpleEnumAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -78394,8 +78394,8 @@ - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completionHan [self writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -78406,93 +78406,93 @@ - (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterClusterSimpleEnumAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeStructAttrWithCompletionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTestClusterStructAttrStructAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -78503,82 +78503,82 @@ - (void)writeAttributeStructAttrWithValue:(MTRTestClusterClusterSimpleStruct * _ new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; - TypeInfo::Type cppValue; - cppValue.a = value.a.unsignedCharValue; - cppValue.b = value.b.boolValue; - cppValue.c = static_cast>(value.c.unsignedCharValue); - cppValue.d = [self asByteSpan:value.d]; - cppValue.e = [self asCharSpan:value.e]; - cppValue.f = static_cast>(value.f.unsignedCharValue); - cppValue.g = value.g.floatValue; - cppValue.h = value.h.doubleValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; + TypeInfo::Type cppValue; + cppValue.a = value.a.unsignedCharValue; + cppValue.b = value.b.boolValue; + cppValue.c = static_cast>(value.c.unsignedCharValue); + cppValue.d = [self asByteSpan:value.d]; + cppValue.e = [self asCharSpan:value.e]; + cppValue.f = static_cast>(value.f.unsignedCharValue); + cppValue.g = value.g.floatValue; + cppValue.h = value.h.doubleValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeStructAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeStructAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRTestClusterStructAttrStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; @@ -78593,8 +78593,8 @@ - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value c [self writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -78605,53 +78605,53 @@ - (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -78673,7 +78673,7 @@ new MTRInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; @@ -78688,8 +78688,8 @@ - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value c [self writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -78700,53 +78700,53 @@ - (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.charValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -78768,7 +78768,7 @@ new MTRInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * suc } - (void)readAttributeRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; @@ -78779,13 +78779,13 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -78796,53 +78796,53 @@ - (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -78864,7 +78864,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; @@ -78875,13 +78875,13 @@ new MTRInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -78892,53 +78892,53 @@ - (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -78960,15 +78960,15 @@ new MTRInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeListLongOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTestClusterListLongOctetStringListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -78976,8 +78976,8 @@ - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value com [self writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -78988,106 +78988,106 @@ - (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSData class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSData *) value[i_0]; - listHolder_0->mList[i_0] = [self asByteSpan:element_0]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSData *) value[i_0]; + listHolder_0->mList[i_0] = [self asByteSpan:element_0]; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeListLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeListLongOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterListLongOctetStringListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterListFabricScopedListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); + }); } - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -79095,8 +79095,8 @@ - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value comple [self writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -79107,152 +79107,152 @@ - (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRTestClusterClusterTestFabricScoped class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRTestClusterClusterTestFabricScoped class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTestClusterClusterTestFabricScoped *) value[i_0]; - listHolder_0->mList[i_0].fabricSensitiveInt8u = element_0.fabricSensitiveInt8u.unsignedCharValue; - if (element_0.optionalFabricSensitiveInt8u != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalFabricSensitiveInt8u.Emplace(); - definedValue_2 = element_0.optionalFabricSensitiveInt8u.unsignedCharValue; - } - if (element_0.nullableFabricSensitiveInt8u == nil) { - listHolder_0->mList[i_0].nullableFabricSensitiveInt8u.SetNull(); + auto element_0 = (MTRTestClusterClusterTestFabricScoped *) value[i_0]; + listHolder_0->mList[i_0].fabricSensitiveInt8u = element_0.fabricSensitiveInt8u.unsignedCharValue; + if (element_0.optionalFabricSensitiveInt8u != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].optionalFabricSensitiveInt8u.Emplace(); + definedValue_2 = element_0.optionalFabricSensitiveInt8u.unsignedCharValue; + } + if (element_0.nullableFabricSensitiveInt8u == nil) { + listHolder_0->mList[i_0].nullableFabricSensitiveInt8u.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableFabricSensitiveInt8u.SetNonNull(); + nonNullValue_2 = element_0.nullableFabricSensitiveInt8u.unsignedCharValue; + } + if (element_0.nullableOptionalFabricSensitiveInt8u != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalFabricSensitiveInt8u.Emplace(); + if (element_0.nullableOptionalFabricSensitiveInt8u == nil) { + definedValue_2.SetNull(); } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableFabricSensitiveInt8u.SetNonNull(); - nonNullValue_2 = element_0.nullableFabricSensitiveInt8u.unsignedCharValue; + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = element_0.nullableOptionalFabricSensitiveInt8u.unsignedCharValue; } - if (element_0.nullableOptionalFabricSensitiveInt8u != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalFabricSensitiveInt8u.Emplace(); - if (element_0.nullableOptionalFabricSensitiveInt8u == nil) { - definedValue_2.SetNull(); - } else { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - nonNullValue_3 = element_0.nullableOptionalFabricSensitiveInt8u.unsignedCharValue; + } + listHolder_0->mList[i_0].fabricSensitiveCharString = [self asCharSpan:element_0.fabricSensitiveCharString]; + listHolder_0->mList[i_0].fabricSensitiveStruct.a = element_0.fabricSensitiveStruct.a.unsignedCharValue; + listHolder_0->mList[i_0].fabricSensitiveStruct.b = element_0.fabricSensitiveStruct.b.boolValue; + listHolder_0->mList[i_0].fabricSensitiveStruct.c + = static_castmList[i_0].fabricSensitiveStruct.c)>>( + element_0.fabricSensitiveStruct.c.unsignedCharValue); + listHolder_0->mList[i_0].fabricSensitiveStruct.d = [self asByteSpan:element_0.fabricSensitiveStruct.d]; + listHolder_0->mList[i_0].fabricSensitiveStruct.e = [self asCharSpan:element_0.fabricSensitiveStruct.e]; + listHolder_0->mList[i_0].fabricSensitiveStruct.f + = static_castmList[i_0].fabricSensitiveStruct.f)>>( + element_0.fabricSensitiveStruct.f.unsignedCharValue); + listHolder_0->mList[i_0].fabricSensitiveStruct.g = element_0.fabricSensitiveStruct.g.floatValue; + listHolder_0->mList[i_0].fabricSensitiveStruct.h = element_0.fabricSensitiveStruct.h.doubleValue; + { + using ListType_2 = std::remove_reference_tmList[i_0].fabricSensitiveInt8uList)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.fabricSensitiveInt8uList.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.fabricSensitiveInt8uList.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; } - } - listHolder_0->mList[i_0].fabricSensitiveCharString = [self asCharSpan:element_0.fabricSensitiveCharString]; - listHolder_0->mList[i_0].fabricSensitiveStruct.a = element_0.fabricSensitiveStruct.a.unsignedCharValue; - listHolder_0->mList[i_0].fabricSensitiveStruct.b = element_0.fabricSensitiveStruct.b.boolValue; - listHolder_0->mList[i_0].fabricSensitiveStruct.c - = static_castmList[i_0].fabricSensitiveStruct.c)>>( - element_0.fabricSensitiveStruct.c.unsignedCharValue); - listHolder_0->mList[i_0].fabricSensitiveStruct.d = [self asByteSpan:element_0.fabricSensitiveStruct.d]; - listHolder_0->mList[i_0].fabricSensitiveStruct.e = [self asCharSpan:element_0.fabricSensitiveStruct.e]; - listHolder_0->mList[i_0].fabricSensitiveStruct.f - = static_castmList[i_0].fabricSensitiveStruct.f)>>( - element_0.fabricSensitiveStruct.f.unsignedCharValue); - listHolder_0->mList[i_0].fabricSensitiveStruct.g = element_0.fabricSensitiveStruct.g.floatValue; - listHolder_0->mList[i_0].fabricSensitiveStruct.h = element_0.fabricSensitiveStruct.h.doubleValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].fabricSensitiveInt8uList)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.fabricSensitiveInt8uList.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.fabricSensitiveInt8uList.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.fabricSensitiveInt8uList.count; ++i_2) { + if (![element_0.fabricSensitiveInt8uList[i_2] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.fabricSensitiveInt8uList.count; ++i_2) { - if (![element_0.fabricSensitiveInt8uList[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.fabricSensitiveInt8uList[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedCharValue; - } - listHolder_0->mList[i_0].fabricSensitiveInt8uList - = ListType_2(listHolder_2->mList, element_0.fabricSensitiveInt8uList.count); - } else { - listHolder_0->mList[i_0].fabricSensitiveInt8uList = ListType_2(); + auto element_2 = (NSNumber *) element_0.fabricSensitiveInt8uList[i_2]; + listHolder_2->mList[i_2] = element_2.unsignedCharValue; } + listHolder_0->mList[i_0].fabricSensitiveInt8uList + = ListType_2(listHolder_2->mList, element_0.fabricSensitiveInt8uList.count); + } else { + listHolder_0->mList[i_0].fabricSensitiveInt8uList = ListType_2(); } - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeListFabricScopedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeListFabricScopedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterListFabricScopedListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeTimedWriteBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; @@ -79267,8 +79267,8 @@ - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value comp [self writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -79279,52 +79279,52 @@ - (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeTimedWriteBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeTimedWriteBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -79346,7 +79346,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeGeneralErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; @@ -79361,8 +79361,8 @@ - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value co [self writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -79373,53 +79373,53 @@ - (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeGeneralErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneralErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -79441,7 +79441,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeClusterErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; @@ -79456,8 +79456,8 @@ - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value co [self writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -79468,53 +79468,53 @@ - (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeClusterErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterErrorBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -79536,7 +79536,7 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeUnsupportedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; @@ -79551,8 +79551,8 @@ - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completion [self writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -79563,51 +79563,51 @@ - (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeUnsupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeUnsupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -79629,15 +79629,15 @@ new MTRBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s } - (void)readAttributeNullableBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableBooleanAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -79645,8 +79645,8 @@ - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value compl [self writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -79657,57 +79657,57 @@ - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.boolValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.boolValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableBooleanWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -79729,15 +79729,15 @@ new MTRNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancel } - (void)readAttributeNullableBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTestClusterNullableBitmap8AttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -79745,8 +79745,8 @@ - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value compl [self writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -79757,88 +79757,88 @@ - (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableBitmap8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterNullableBitmap8AttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeNullableBitmap16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTestClusterNullableBitmap16AttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -79846,8 +79846,8 @@ - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value comp [self writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -79858,88 +79858,88 @@ - (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedShortValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedShortValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableBitmap16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterNullableBitmap16AttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeNullableBitmap32WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTestClusterNullableBitmap32AttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -79947,8 +79947,8 @@ - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value comp [self writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -79959,88 +79959,88 @@ - (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedIntValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedIntValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableBitmap32WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterNullableBitmap32AttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeNullableBitmap64WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTestClusterNullableBitmap64AttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -80048,8 +80048,8 @@ - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value comp [self writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -80060,88 +80060,88 @@ - (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedLongLongValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedLongLongValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableBitmap64WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterNullableBitmap64AttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeNullableInt8uWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -80149,8 +80149,8 @@ - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value complet [self writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -80161,57 +80161,57 @@ - (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -80233,15 +80233,15 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeNullableInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -80249,8 +80249,8 @@ - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value comple [self writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -80261,57 +80261,57 @@ - (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -80333,15 +80333,15 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt32uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -80349,8 +80349,8 @@ - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value comple [self writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -80361,57 +80361,57 @@ - (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableInt24uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -80433,15 +80433,15 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt32uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -80449,8 +80449,8 @@ - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value comple [self writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -80461,57 +80461,57 @@ - (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableInt32uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -80533,15 +80533,15 @@ new MTRNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -80549,8 +80549,8 @@ - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value comple [self writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -80561,57 +80561,57 @@ - (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableInt40uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -80633,15 +80633,15 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -80649,8 +80649,8 @@ - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value comple [self writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -80661,57 +80661,57 @@ - (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableInt48uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -80733,15 +80733,15 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -80749,8 +80749,8 @@ - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value comple [self writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -80761,57 +80761,57 @@ - (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableInt56uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -80833,15 +80833,15 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -80849,8 +80849,8 @@ - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value comple [self writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -80861,57 +80861,57 @@ - (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableInt64uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -80933,15 +80933,15 @@ new MTRNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableInt8sWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -80949,8 +80949,8 @@ - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value complet [self writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -80961,57 +80961,57 @@ - (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.charValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.charValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -81033,15 +81033,15 @@ new MTRNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeNullableInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -81049,8 +81049,8 @@ - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value comple [self writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -81061,57 +81061,57 @@ - (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -81133,15 +81133,15 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt32sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -81149,8 +81149,8 @@ - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value comple [self writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -81161,57 +81161,57 @@ - (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.intValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.intValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableInt24sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -81233,15 +81233,15 @@ new MTRNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt32sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -81249,8 +81249,8 @@ - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value comple [self writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -81261,57 +81261,57 @@ - (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.intValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.intValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableInt32sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -81333,15 +81333,15 @@ new MTRNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt64sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -81349,8 +81349,8 @@ - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value comple [self writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -81361,57 +81361,57 @@ - (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.longLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.longLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableInt40sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -81433,15 +81433,15 @@ new MTRNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt64sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -81449,8 +81449,8 @@ - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value comple [self writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -81461,57 +81461,57 @@ - (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.longLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.longLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableInt48sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -81533,15 +81533,15 @@ new MTRNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt64sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -81549,8 +81549,8 @@ - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value comple [self writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -81561,57 +81561,57 @@ - (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.longLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.longLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableInt56sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -81633,15 +81633,15 @@ new MTRNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt64sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -81649,8 +81649,8 @@ - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value comple [self writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -81661,57 +81661,57 @@ - (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.longLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.longLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableInt64sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -81733,15 +81733,15 @@ new MTRNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableEnum8WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -81749,8 +81749,8 @@ - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value complet [self writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -81761,57 +81761,57 @@ - (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableEnum8WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -81833,15 +81833,15 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeNullableEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -81849,8 +81849,8 @@ - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value comple [self writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -81861,57 +81861,57 @@ - (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableEnum16WithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -81933,15 +81933,15 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableFloatSingleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableFloatAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -81949,8 +81949,8 @@ - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value c [self writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -81961,58 +81961,58 @@ - (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.floatValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.floatValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableFloatAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableFloatSingleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -82034,15 +82034,15 @@ new MTRNullableFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeNullableFloatDoubleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableDoubleAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -82050,8 +82050,8 @@ - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value c [self writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -82062,58 +82062,58 @@ - (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.doubleValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.doubleValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableDoubleAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableFloatDoubleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableDoubleAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -82135,15 +82135,15 @@ new MTRNullableDoubleAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableOctetStringWithCompletionHandler:(void (^)(NSData * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableOctetStringAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -82151,8 +82151,8 @@ - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value com [self writeAttributeNullableOctetStringWithValue:(NSData * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -82163,58 +82163,58 @@ - (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = [self asByteSpan:value]; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = [self asByteSpan:value]; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableOctetStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -82236,15 +82236,15 @@ new MTRNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Ca } - (void)readAttributeNullableCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableCharStringAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -82252,8 +82252,8 @@ - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value co [self writeAttributeNullableCharStringWithValue:(NSString * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -82264,57 +82264,57 @@ - (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = [self asCharSpan:value]; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = [self asCharSpan:value]; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableCharStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -82336,15 +82336,15 @@ new MTRNullableCharStringAttributeCallbackBridge(queue, completionHandler, ^(Can } - (void)readAttributeNullableEnumAttrWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler @@ -82352,8 +82352,8 @@ - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value comp [self writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -82364,100 +82364,100 @@ - (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableEnumAttrWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRNullableTestClusterClusterSimpleEnumAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeNullableStructWithCompletionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTestClusterNullableStructStructAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -82468,107 +82468,107 @@ - (void)writeAttributeNullableStructWithValue:(MTRTestClusterClusterSimpleStruct new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0.a = value.a.unsignedCharValue; - nonNullValue_0.b = value.b.boolValue; - nonNullValue_0.c = static_cast>(value.c.unsignedCharValue); - nonNullValue_0.d = [self asByteSpan:value.d]; - nonNullValue_0.e = [self asCharSpan:value.e]; - nonNullValue_0.f = static_cast>(value.f.unsignedCharValue); - nonNullValue_0.g = value.g.floatValue; - nonNullValue_0.h = value.h.doubleValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0.a = value.a.unsignedCharValue; + nonNullValue_0.b = value.b.boolValue; + nonNullValue_0.c = static_cast>(value.c.unsignedCharValue); + nonNullValue_0.d = [self asByteSpan:value.d]; + nonNullValue_0.e = [self asCharSpan:value.e]; + nonNullValue_0.f = static_cast>(value.f.unsignedCharValue); + nonNullValue_0.g = value.g.floatValue; + nonNullValue_0.h = value.h.doubleValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableStructWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableStructWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(MTRTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRTestClusterNullableStructStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -82579,58 +82579,58 @@ - (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullabl new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableRangeRestrictedInt8uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -82652,27 +82652,27 @@ new MTRNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt8sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -82683,58 +82683,58 @@ - (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullabl new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.charValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.charValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRNullableInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableRangeRestrictedInt8sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -82756,27 +82756,27 @@ new MTRNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelab } - (void)readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -82787,58 +82787,58 @@ - (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullab new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableRangeRestrictedInt16uWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -82860,27 +82860,27 @@ new MTRNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { [self writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + params:nil + completionHandler:completionHandler]; } - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + params:(MTRWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeout; if (params != nil) { @@ -82891,58 +82891,58 @@ - (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullab new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeout); + }); } - (void)subscribeAttributeNullableRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new MTRNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeNullableRangeRestrictedInt16sWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -82964,200 +82964,200 @@ new MTRNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancela } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTestClusterGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRTestClusterAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { new MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRTestClusterAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { new MTRTestClusterAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; @@ -83168,34 +83168,34 @@ new MTRInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -83217,7 +83217,7 @@ new MTRInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; @@ -83228,36 +83228,36 @@ new MTRInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Ca } - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new MTRInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], MTRInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, nil, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + }, + subscriptionEstablishedHandler); } + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { @@ -83281,7 +83281,7 @@ new MTRInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)dealloc { // Must delete cppCluster on the Matter queue. - dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^{ + dispatch_sync(chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(), ^ { if (self.cppCluster != nullptr) { delete self.cppCluster; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 813e42fbd22743..faf3009016e577 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -355,8 +355,8 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", - NSStringFromClass([self class]), _status, _groupId, _sceneId, _transitionTime, _sceneName, _extensionFieldSets]; + stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", + NSStringFromClass([self class]), _status, _groupId, _sceneId, _transitionTime, _sceneName, _extensionFieldSets]; return descriptionString; } @@ -650,8 +650,8 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", - NSStringFromClass([self class]), _status, _groupId, _sceneId, _transitionTime, _sceneName, _extensionFieldSets]; + stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", + NSStringFromClass([self class]), _status, _groupId, _sceneId, _transitionTime, _sceneName, _extensionFieldSets]; return descriptionString; } @@ -771,7 +771,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: effectId:%@; effectVariant:%@; >", NSStringFromClass([self class]), _effectId, _effectVariant]; + stringWithFormat:@"<%@: effectId:%@; effectVariant:%@; >", NSStringFromClass([self class]), _effectId, _effectVariant]; return descriptionString; } @@ -931,7 +931,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: level:%@; transitionTime:%@; >", NSStringFromClass([self class]), _level, _transitionTime]; + stringWithFormat:@"<%@: level:%@; transitionTime:%@; >", NSStringFromClass([self class]), _level, _transitionTime]; return descriptionString; } @@ -1168,8 +1168,8 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: totalProfileNum:%@; powerProfileId:%@; numOfTransferredPhases:%@; transferredPhases:%@; >", - NSStringFromClass([self class]), _totalProfileNum, _powerProfileId, _numOfTransferredPhases, _transferredPhases]; + stringWithFormat:@"<%@: totalProfileNum:%@; powerProfileId:%@; numOfTransferredPhases:%@; transferredPhases:%@; >", + NSStringFromClass([self class]), _totalProfileNum, _powerProfileId, _numOfTransferredPhases, _transferredPhases]; return descriptionString; } @@ -1210,8 +1210,8 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: totalProfileNum:%@; powerProfileId:%@; numOfTransferredPhases:%@; transferredPhases:%@; >", - NSStringFromClass([self class]), _totalProfileNum, _powerProfileId, _numOfTransferredPhases, _transferredPhases]; + stringWithFormat:@"<%@: totalProfileNum:%@; powerProfileId:%@; numOfTransferredPhases:%@; transferredPhases:%@; >", + NSStringFromClass([self class]), _totalProfileNum, _powerProfileId, _numOfTransferredPhases, _transferredPhases]; return descriptionString; } @@ -2144,7 +2144,7 @@ - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: vendorId:%@; productId:%@; softwareVersion:%@; protocolsSupported:%@; " - @"hardwareVersion:%@; location:%@; requestorCanConsent:%@; metadataForProvider:%@; >", + @"hardwareVersion:%@; location:%@; requestorCanConsent:%@; metadataForProvider:%@; >", NSStringFromClass([self class]), _vendorId, _productId, _softwareVersion, _protocolsSupported, _hardwareVersion, _location, _requestorCanConsent, [_metadataForProvider base64EncodedStringWithOptions:0]]; return descriptionString; @@ -2180,7 +2180,7 @@ - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; delayedActionTime:%@; imageURI:%@; softwareVersion:%@; " - @"softwareVersionString:%@; updateToken:%@; userConsentNeeded:%@; metadataForRequestor:%@; >", + @"softwareVersionString:%@; updateToken:%@; userConsentNeeded:%@; metadataForRequestor:%@; >", NSStringFromClass([self class]), _status, _delayedActionTime, _imageURI, _softwareVersion, _softwareVersionString, [_updateToken base64EncodedStringWithOptions:0], _userConsentNeeded, [_metadataForRequestor base64EncodedStringWithOptions:0]]; @@ -2226,7 +2226,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: action:%@; delayedActionTime:%@; >", NSStringFromClass([self class]), _action, _delayedActionTime]; + stringWithFormat:@"<%@: action:%@; delayedActionTime:%@; >", NSStringFromClass([self class]), _action, _delayedActionTime]; return descriptionString; } @@ -2275,9 +2275,9 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: providerNodeId:%@; vendorId:%@; announcementReason:%@; metadataForNode:%@; endpoint:%@; >", - NSStringFromClass([self class]), _providerNodeId, _vendorId, _announcementReason, - [_metadataForNode base64EncodedStringWithOptions:0], _endpoint]; + stringWithFormat:@"<%@: providerNodeId:%@; vendorId:%@; announcementReason:%@; metadataForNode:%@; endpoint:%@; >", + NSStringFromClass([self class]), _providerNodeId, _vendorId, _announcementReason, + [_metadataForNode base64EncodedStringWithOptions:0], _endpoint]; return descriptionString; } @@ -3212,7 +3212,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; + stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; return descriptionString; } @@ -3231,7 +3231,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; + stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; return descriptionString; } @@ -3283,9 +3283,9 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat: - @"<%@: weekDayIndex:%@; userIndex:%@; daysMask:%@; startHour:%@; startMinute:%@; endHour:%@; endMinute:%@; >", - NSStringFromClass([self class]), _weekDayIndex, _userIndex, _daysMask, _startHour, _startMinute, _endHour, _endMinute]; + stringWithFormat: + @"<%@: weekDayIndex:%@; userIndex:%@; daysMask:%@; startHour:%@; startMinute:%@; endHour:%@; endMinute:%@; >", + NSStringFromClass([self class]), _weekDayIndex, _userIndex, _daysMask, _startHour, _startMinute, _endHour, _endMinute]; return descriptionString; } @@ -3306,7 +3306,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex]; + stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex]; return descriptionString; } @@ -3339,7 +3339,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; status:%@; daysMask:%@; " - @"startHour:%@; startMinute:%@; endHour:%@; endMinute:%@; >", + @"startHour:%@; startMinute:%@; endHour:%@; endMinute:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex, _status, _daysMask, _startHour, _startMinute, _endHour, _endMinute]; return descriptionString; @@ -3362,7 +3362,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex]; + stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex]; return descriptionString; } @@ -3409,7 +3409,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex]; + stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex]; return descriptionString; } @@ -3458,7 +3458,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex]; + stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex]; return descriptionString; } @@ -3581,10 +3581,10 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat: - @"<%@: operationType:%@; userIndex:%@; userName:%@; userUniqueId:%@; userStatus:%@; userType:%@; credentialRule:%@; >", - NSStringFromClass([self class]), _operationType, _userIndex, _userName, _userUniqueId, _userStatus, _userType, - _credentialRule]; + stringWithFormat: + @"<%@: operationType:%@; userIndex:%@; userName:%@; userUniqueId:%@; userStatus:%@; userType:%@; credentialRule:%@; >", + NSStringFromClass([self class]), _operationType, _userIndex, _userName, _userUniqueId, _userStatus, _userType, + _credentialRule]; return descriptionString; } @@ -3639,10 +3639,10 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: userIndex:%@; userName:%@; userUniqueId:%@; userStatus:%@; userType:%@; credentialRule:%@; " - @"credentials:%@; creatorFabricIndex:%@; lastModifiedFabricIndex:%@; nextUserIndex:%@; >", - NSStringFromClass([self class]), _userIndex, _userName, _userUniqueId, _userStatus, _userType, _credentialRule, - _credentials, _creatorFabricIndex, _lastModifiedFabricIndex, _nextUserIndex]; + stringWithFormat:@"<%@: userIndex:%@; userName:%@; userUniqueId:%@; userStatus:%@; userType:%@; credentialRule:%@; " + @"credentials:%@; creatorFabricIndex:%@; lastModifiedFabricIndex:%@; nextUserIndex:%@; >", + NSStringFromClass([self class]), _userIndex, _userName, _userUniqueId, _userStatus, _userType, _credentialRule, + _credentials, _creatorFabricIndex, _lastModifiedFabricIndex, _nextUserIndex]; return descriptionString; } @@ -3689,9 +3689,9 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: operationType:%@; credential:%@; credentialData:%@; userIndex:%@; userStatus:%@; userType:%@; >", - NSStringFromClass([self class]), _operationType, _credential, [_credentialData base64EncodedStringWithOptions:0], - _userIndex, _userStatus, _userType]; + stringWithFormat:@"<%@: operationType:%@; credential:%@; credentialData:%@; userIndex:%@; userStatus:%@; userType:%@; >", + NSStringFromClass([self class]), _operationType, _credential, [_credentialData base64EncodedStringWithOptions:0], + _userIndex, _userStatus, _userType]; return descriptionString; } @@ -3760,10 +3760,10 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat: - @"<%@: credentialExists:%@; userIndex:%@; creatorFabricIndex:%@; lastModifiedFabricIndex:%@; nextCredentialIndex:%@; >", - NSStringFromClass([self class]), _credentialExists, _userIndex, _creatorFabricIndex, _lastModifiedFabricIndex, - _nextCredentialIndex]; + stringWithFormat: + @"<%@: credentialExists:%@; userIndex:%@; creatorFabricIndex:%@; lastModifiedFabricIndex:%@; nextCredentialIndex:%@; >", + NSStringFromClass([self class]), _credentialExists, _userIndex, _creatorFabricIndex, _lastModifiedFabricIndex, + _nextCredentialIndex]; return descriptionString; } @@ -3985,8 +3985,8 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekForSequence:%@; modeForSequence:%@; transitions:%@; >", - NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekForSequence, _modeForSequence, _transitions]; + stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekForSequence:%@; modeForSequence:%@; transitions:%@; >", + NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekForSequence, _modeForSequence, _transitions]; return descriptionString; } @@ -4011,8 +4011,8 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekForSequence:%@; modeForSequence:%@; transitions:%@; >", - NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekForSequence, _modeForSequence, _transitions]; + stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekForSequence:%@; modeForSequence:%@; transitions:%@; >", + NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekForSequence, _modeForSequence, _transitions]; return descriptionString; } @@ -4484,9 +4484,9 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat: - @"<%@: updateFlags:%@; action:%@; direction:%@; time:%@; startHue:%@; optionsMask:%@; optionsOverride:%@; >", - NSStringFromClass([self class]), _updateFlags, _action, _direction, _time, _startHue, _optionsMask, _optionsOverride]; + stringWithFormat: + @"<%@: updateFlags:%@; action:%@; direction:%@; time:%@; startHue:%@; optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _updateFlags, _action, _direction, _time, _startHue, _optionsMask, _optionsOverride]; return descriptionString; } @@ -4537,7 +4537,7 @@ - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: moveMode:%@; rate:%@; colorTemperatureMinimumMireds:%@; " - @"colorTemperatureMaximumMireds:%@; optionsMask:%@; optionsOverride:%@; >", + @"colorTemperatureMaximumMireds:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _moveMode, _rate, _colorTemperatureMinimumMireds, _colorTemperatureMaximumMireds, _optionsMask, _optionsOverride]; return descriptionString; @@ -4571,7 +4571,7 @@ - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; colorTemperatureMinimumMireds:%@; " - @"colorTemperatureMaximumMireds:%@; optionsMask:%@; optionsOverride:%@; >", + @"colorTemperatureMaximumMireds:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _colorTemperatureMinimumMireds, _colorTemperatureMaximumMireds, _optionsMask, _optionsOverride]; return descriptionString; @@ -4633,7 +4633,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: majorNumber:%@; minorNumber:%@; >", NSStringFromClass([self class]), _majorNumber, _minorNumber]; + stringWithFormat:@"<%@: majorNumber:%@; minorNumber:%@; >", NSStringFromClass([self class]), _majorNumber, _minorNumber]; return descriptionString; } @@ -4840,7 +4840,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: deltaPositionMilliseconds:%@; >", NSStringFromClass([self class]), _deltaPositionMilliseconds]; + stringWithFormat:@"<%@: deltaPositionMilliseconds:%@; >", NSStringFromClass([self class]), _deltaPositionMilliseconds]; return descriptionString; } @@ -4859,7 +4859,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: deltaPositionMilliseconds:%@; >", NSStringFromClass([self class]), _deltaPositionMilliseconds]; + stringWithFormat:@"<%@: deltaPositionMilliseconds:%@; >", NSStringFromClass([self class]), _deltaPositionMilliseconds]; return descriptionString; } @@ -5044,7 +5044,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: search:%@; autoPlay:%@; data:%@; >", NSStringFromClass([self class]), _search, _autoPlay, _data]; + stringWithFormat:@"<%@: search:%@; autoPlay:%@; data:%@; >", NSStringFromClass([self class]), _search, _autoPlay, _data]; return descriptionString; } @@ -5311,7 +5311,7 @@ - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: messageId:%@; messageControl:%@; startTime:%@; durationInMinutes:%@; message:%@; " - @"optionalExtendedMessageControl:%@; >", + @"optionalExtendedMessageControl:%@; >", NSStringFromClass([self class]), _messageId, _messageControl, _startTime, _durationInMinutes, _message, _optionalExtendedMessageControl]; return descriptionString; @@ -5350,7 +5350,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: messageId:%@; messageControl:%@; >", NSStringFromClass([self class]), _messageId, _messageControl]; + stringWithFormat:@"<%@: messageId:%@; messageControl:%@; >", NSStringFromClass([self class]), _messageId, _messageControl]; return descriptionString; } @@ -5407,7 +5407,7 @@ - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: messageId:%@; messageControl:%@; startTime:%@; durationInMinutes:%@; message:%@; " - @"optionalExtendedMessageControl:%@; >", + @"optionalExtendedMessageControl:%@; >", NSStringFromClass([self class]), _messageId, _messageControl, _startTime, _durationInMinutes, _message, _optionalExtendedMessageControl]; return descriptionString; @@ -5428,7 +5428,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: earliestImplementationTime:%@; >", NSStringFromClass([self class]), _earliestImplementationTime]; + stringWithFormat:@"<%@: earliestImplementationTime:%@; >", NSStringFromClass([self class]), _earliestImplementationTime]; return descriptionString; } @@ -5677,8 +5677,8 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: profileCount:%@; profileIntervalPeriod:%@; maxNumberOfIntervals:%@; listOfAttributes:%@; >", - NSStringFromClass([self class]), _profileCount, _profileIntervalPeriod, _maxNumberOfIntervals, _listOfAttributes]; + stringWithFormat:@"<%@: profileCount:%@; profileIntervalPeriod:%@; maxNumberOfIntervals:%@; listOfAttributes:%@; >", + NSStringFromClass([self class]), _profileCount, _profileIntervalPeriod, _maxNumberOfIntervals, _listOfAttributes]; return descriptionString; } @@ -5723,7 +5723,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: startTime:%@; status:%@; profileIntervalPeriod:%@; " - @"numberOfIntervalsDelivered:%@; attributeId:%@; intervals:%@; >", + @"numberOfIntervalsDelivered:%@; attributeId:%@; intervals:%@; >", NSStringFromClass([self class]), _startTime, _status, _profileIntervalPeriod, _numberOfIntervalsDelivered, _attributeId, _intervals]; return descriptionString; @@ -6121,21 +6121,21 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: nullableIntWasNull:%@; nullableIntValue:%@; optionalIntWasPresent:%@; optionalIntValue:%@; " - @"nullableOptionalIntWasPresent:%@; nullableOptionalIntWasNull:%@; nullableOptionalIntValue:%@; " - @"nullableStringWasNull:%@; nullableStringValue:%@; optionalStringWasPresent:%@; optionalStringValue:%@; " - @"nullableOptionalStringWasPresent:%@; nullableOptionalStringWasNull:%@; nullableOptionalStringValue:%@; " - @"nullableStructWasNull:%@; nullableStructValue:%@; optionalStructWasPresent:%@; optionalStructValue:%@; " - @"nullableOptionalStructWasPresent:%@; nullableOptionalStructWasNull:%@; nullableOptionalStructValue:%@; " - @"nullableListWasNull:%@; nullableListValue:%@; optionalListWasPresent:%@; optionalListValue:%@; " - @"nullableOptionalListWasPresent:%@; nullableOptionalListWasNull:%@; nullableOptionalListValue:%@; >", - NSStringFromClass([self class]), _nullableIntWasNull, _nullableIntValue, _optionalIntWasPresent, _optionalIntValue, - _nullableOptionalIntWasPresent, _nullableOptionalIntWasNull, _nullableOptionalIntValue, _nullableStringWasNull, - _nullableStringValue, _optionalStringWasPresent, _optionalStringValue, _nullableOptionalStringWasPresent, - _nullableOptionalStringWasNull, _nullableOptionalStringValue, _nullableStructWasNull, _nullableStructValue, - _optionalStructWasPresent, _optionalStructValue, _nullableOptionalStructWasPresent, _nullableOptionalStructWasNull, - _nullableOptionalStructValue, _nullableListWasNull, _nullableListValue, _optionalListWasPresent, _optionalListValue, - _nullableOptionalListWasPresent, _nullableOptionalListWasNull, _nullableOptionalListValue]; + stringWithFormat:@"<%@: nullableIntWasNull:%@; nullableIntValue:%@; optionalIntWasPresent:%@; optionalIntValue:%@; " + @"nullableOptionalIntWasPresent:%@; nullableOptionalIntWasNull:%@; nullableOptionalIntValue:%@; " + @"nullableStringWasNull:%@; nullableStringValue:%@; optionalStringWasPresent:%@; optionalStringValue:%@; " + @"nullableOptionalStringWasPresent:%@; nullableOptionalStringWasNull:%@; nullableOptionalStringValue:%@; " + @"nullableStructWasNull:%@; nullableStructValue:%@; optionalStructWasPresent:%@; optionalStructValue:%@; " + @"nullableOptionalStructWasPresent:%@; nullableOptionalStructWasNull:%@; nullableOptionalStructValue:%@; " + @"nullableListWasNull:%@; nullableListValue:%@; optionalListWasPresent:%@; optionalListValue:%@; " + @"nullableOptionalListWasPresent:%@; nullableOptionalListWasNull:%@; nullableOptionalListValue:%@; >", + NSStringFromClass([self class]), _nullableIntWasNull, _nullableIntValue, _optionalIntWasPresent, _optionalIntValue, + _nullableOptionalIntWasPresent, _nullableOptionalIntWasNull, _nullableOptionalIntValue, _nullableStringWasNull, + _nullableStringValue, _optionalStringWasPresent, _optionalStringValue, _nullableOptionalStringWasPresent, + _nullableOptionalStringWasNull, _nullableOptionalStringValue, _nullableStructWasNull, _nullableStructValue, + _optionalStructWasPresent, _optionalStructValue, _nullableOptionalStructWasPresent, _nullableOptionalStructWasNull, + _nullableOptionalStructValue, _nullableListWasNull, _nullableListValue, _optionalListWasPresent, _optionalListValue, + _nullableOptionalListWasPresent, _nullableOptionalListWasNull, _nullableOptionalListValue]; return descriptionString; } @@ -6396,8 +6396,8 @@ - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: nullableInt:%@; optionalInt:%@; nullableOptionalInt:%@; nullableString:%@; " - @"optionalString:%@; nullableOptionalString:%@; nullableStruct:%@; optionalStruct:%@; " - @"nullableOptionalStruct:%@; nullableList:%@; optionalList:%@; nullableOptionalList:%@; >", + @"optionalString:%@; nullableOptionalString:%@; nullableStruct:%@; optionalStruct:%@; " + @"nullableOptionalStruct:%@; nullableList:%@; optionalList:%@; nullableOptionalList:%@; >", NSStringFromClass([self class]), _nullableInt, _optionalInt, _nullableOptionalInt, _nullableString, _optionalString, _nullableOptionalString, _nullableStruct, _optionalStruct, _nullableOptionalStruct, _nullableList, _optionalList, _nullableOptionalList]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 4b1717d3d2b1c7..b5390e59903261 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -177,7 +177,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead if (cppValue.latestValue.Value().subjects.IsNull()) { memberValue.subjects = nil; } else { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_3 = [NSMutableArray new]; auto iter_3 = cppValue.latestValue.Value().subjects.Value().begin(); while (iter_3.Next()) { @@ -197,7 +197,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead if (cppValue.latestValue.Value().targets.IsNull()) { memberValue.targets = nil; } else { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_3 = [NSMutableArray new]; auto iter_3 = cppValue.latestValue.Value().targets.Value().begin(); while (iter_3.Next()) { @@ -282,7 +282,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead } else { memberValue = [MTRAccessControlClusterExtensionEntry new]; memberValue.data = [NSData dataWithBytes:cppValue.latestValue.Value().data.data() - length:cppValue.latestValue.Value().data.size()]; + length:cppValue.latestValue.Value().data.size()]; memberValue.fabricIndex = [NSNumber numberWithUnsignedChar:cppValue.latestValue.Value().fabricIndex]; } value.latestValue = memberValue; @@ -663,7 +663,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead do { NSArray * _Nonnull memberValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.current.begin(); while (iter_0.Next()) { @@ -683,7 +683,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead } while (0); do { NSArray * _Nonnull memberValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.previous.begin(); while (iter_0.Next()) { @@ -716,7 +716,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead do { NSArray * _Nonnull memberValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.current.begin(); while (iter_0.Next()) { @@ -736,7 +736,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead } while (0); do { NSArray * _Nonnull memberValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.previous.begin(); while (iter_0.Next()) { @@ -769,7 +769,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead do { NSArray * _Nonnull memberValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.current.begin(); while (iter_0.Next()) { @@ -789,7 +789,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead } while (0); do { NSArray * _Nonnull memberValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.previous.begin(); while (iter_0.Next()) { @@ -857,8 +857,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead NSString * _Nullable memberValue; if (cppValue.name.HasValue()) { memberValue = [[NSString alloc] initWithBytes:cppValue.name.Value().data() - length:cppValue.name.Value().size() - encoding:NSUTF8StringEncoding]; + length:cppValue.name.Value().size() + encoding:NSUTF8StringEncoding]; } else { memberValue = nil; } @@ -868,7 +868,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead NSData * _Nullable memberValue; if (cppValue.faultRecording.HasValue()) { memberValue = [NSData dataWithBytes:cppValue.faultRecording.Value().data() - length:cppValue.faultRecording.Value().size()]; + length:cppValue.faultRecording.Value().size()]; } else { memberValue = nil; } @@ -1390,7 +1390,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead if (cppValue.credentials.Value().IsNull()) { memberValue = nil; } else { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = cppValue.credentials.Value().Value().begin(); while (iter_2.Next()) { @@ -1476,7 +1476,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead if (cppValue.credentials.Value().IsNull()) { memberValue = nil; } else { - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_2 = [NSMutableArray new]; auto iter_2 = cppValue.credentials.Value().Value().begin(); while (iter_2.Next()) { @@ -2091,8 +2091,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead memberValue.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.arg4.c)]; memberValue.d = [NSData dataWithBytes:cppValue.arg4.d.data() length:cppValue.arg4.d.size()]; memberValue.e = [[NSString alloc] initWithBytes:cppValue.arg4.e.data() - length:cppValue.arg4.e.size() - encoding:NSUTF8StringEncoding]; + length:cppValue.arg4.e.size() + encoding:NSUTF8StringEncoding]; memberValue.f = [NSNumber numberWithUnsignedChar:cppValue.arg4.f.Raw()]; memberValue.g = [NSNumber numberWithFloat:cppValue.arg4.g]; memberValue.h = [NSNumber numberWithDouble:cppValue.arg4.h]; @@ -2100,7 +2100,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead } while (0); do { NSArray * _Nonnull memberValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.arg5.begin(); while (iter_0.Next()) { @@ -2112,8 +2112,8 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead newElement_0.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c)]; newElement_0.d = [NSData dataWithBytes:entry_0.d.data() length:entry_0.d.size()]; newElement_0.e = [[NSString alloc] initWithBytes:entry_0.e.data() - length:entry_0.e.size() - encoding:NSUTF8StringEncoding]; + length:entry_0.e.size() + encoding:NSUTF8StringEncoding]; newElement_0.f = [NSNumber numberWithUnsignedChar:entry_0.f.Raw()]; newElement_0.g = [NSNumber numberWithFloat:entry_0.g]; newElement_0.h = [NSNumber numberWithDouble:entry_0.h]; @@ -2130,7 +2130,7 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead } while (0); do { NSArray * _Nonnull memberValue; - { // Scope for our temporary variables + { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; auto iter_0 = cppValue.arg6.begin(); while (iter_0.Next()) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index e5cf8c5d7d701a..2a05092bc0c638 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -82,8 +82,8 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: powerProfileId:%@; energyPhaseId:%@; powerProfileRemoteControl:%@; powerProfileState:%@; >", - NSStringFromClass([self class]), _powerProfileId, _energyPhaseId, _powerProfileRemoteControl, _powerProfileState]; + stringWithFormat:@"<%@: powerProfileId:%@; energyPhaseId:%@; powerProfileRemoteControl:%@; powerProfileState:%@; >", + NSStringFromClass([self class]), _powerProfileId, _energyPhaseId, _powerProfileRemoteControl, _powerProfileState]; return descriptionString; } @@ -133,10 +133,10 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat: - @"<%@: energyPhaseId:%@; macroPhaseId:%@; expectedDuration:%@; peakPower:%@; energy:%@; maxActivationDelay:%@; >", - NSStringFromClass([self class]), _energyPhaseId, _macroPhaseId, _expectedDuration, _peakPower, _energy, - _maxActivationDelay]; + stringWithFormat: + @"<%@: energyPhaseId:%@; macroPhaseId:%@; expectedDuration:%@; peakPower:%@; energy:%@; maxActivationDelay:%@; >", + NSStringFromClass([self class]), _energyPhaseId, _macroPhaseId, _expectedDuration, _peakPower, _energy, + _maxActivationDelay]; return descriptionString; } @@ -283,8 +283,8 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: adminNodeID:%@; adminPasscodeID:%@; changeType:%@; latestValue:%@; adminFabricIndex:%@; >", - NSStringFromClass([self class]), _adminNodeID, _adminPasscodeID, _changeType, _latestValue, _adminFabricIndex]; + stringWithFormat:@"<%@: adminNodeID:%@; adminPasscodeID:%@; changeType:%@; latestValue:%@; adminFabricIndex:%@; >", + NSStringFromClass([self class]), _adminNodeID, _adminPasscodeID, _changeType, _latestValue, _adminFabricIndex]; return descriptionString; } @@ -311,8 +311,8 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: adminNodeID:%@; adminPasscodeID:%@; changeType:%@; latestValue:%@; adminFabricIndex:%@; >", - NSStringFromClass([self class]), _adminNodeID, _adminPasscodeID, _changeType, _latestValue, _adminFabricIndex]; + stringWithFormat:@"<%@: adminNodeID:%@; adminPasscodeID:%@; changeType:%@; latestValue:%@; adminFabricIndex:%@; >", + NSStringFromClass([self class]), _adminNodeID, _adminPasscodeID, _changeType, _latestValue, _adminFabricIndex]; return descriptionString; } @@ -742,10 +742,10 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat: - @"<%@: panId:%@; extendedPanId:%@; networkName:%@; channel:%@; version:%@; extendedAddress:%@; rssi:%@; lqi:%@; >", - NSStringFromClass([self class]), _panId, _extendedPanId, _networkName, _channel, _version, - [_extendedAddress base64EncodedStringWithOptions:0], _rssi, _lqi]; + stringWithFormat: + @"<%@: panId:%@; extendedPanId:%@; networkName:%@; channel:%@; version:%@; extendedAddress:%@; rssi:%@; lqi:%@; >", + NSStringFromClass([self class]), _panId, _extendedPanId, _networkName, _channel, _version, + [_extendedAddress base64EncodedStringWithOptions:0], _rssi, _lqi]; return descriptionString; } @@ -809,10 +809,10 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: name:%@; isOperational:%@; offPremiseServicesReachableIPv4:%@; offPremiseServicesReachableIPv6:%@; " - @"hardwareAddress:%@; iPv4Addresses:%@; iPv6Addresses:%@; type:%@; >", - NSStringFromClass([self class]), _name, _isOperational, _offPremiseServicesReachableIPv4, _offPremiseServicesReachableIPv6, - [_hardwareAddress base64EncodedStringWithOptions:0], _iPv4Addresses, _iPv6Addresses, _type]; + stringWithFormat:@"<%@: name:%@; isOperational:%@; offPremiseServicesReachableIPv4:%@; offPremiseServicesReachableIPv6:%@; " + @"hardwareAddress:%@; iPv4Addresses:%@; iPv6Addresses:%@; type:%@; >", + NSStringFromClass([self class]), _name, _isOperational, _offPremiseServicesReachableIPv4, _offPremiseServicesReachableIPv6, + [_hardwareAddress base64EncodedStringWithOptions:0], _iPv4Addresses, _iPv6Addresses, _type]; return descriptionString; } @@ -991,11 +991,11 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat: - @"<%@: extAddress:%@; age:%@; rloc16:%@; linkFrameCounter:%@; mleFrameCounter:%@; lqi:%@; averageRssi:%@; lastRssi:%@; " - @"frameErrorRate:%@; messageErrorRate:%@; rxOnWhenIdle:%@; fullThreadDevice:%@; fullNetworkData:%@; isChild:%@; >", - NSStringFromClass([self class]), _extAddress, _age, _rloc16, _linkFrameCounter, _mleFrameCounter, _lqi, _averageRssi, - _lastRssi, _frameErrorRate, _messageErrorRate, _rxOnWhenIdle, _fullThreadDevice, _fullNetworkData, _isChild]; + stringWithFormat: + @"<%@: extAddress:%@; age:%@; rloc16:%@; linkFrameCounter:%@; mleFrameCounter:%@; lqi:%@; averageRssi:%@; lastRssi:%@; " + @"frameErrorRate:%@; messageErrorRate:%@; rxOnWhenIdle:%@; fullThreadDevice:%@; fullNetworkData:%@; isChild:%@; >", + NSStringFromClass([self class]), _extAddress, _age, _rloc16, _linkFrameCounter, _mleFrameCounter, _lqi, _averageRssi, + _lastRssi, _frameErrorRate, _messageErrorRate, _rxOnWhenIdle, _fullThreadDevice, _fullNetworkData, _isChild]; return descriptionString; } @@ -1036,12 +1036,12 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: activeTimestampPresent:%@; pendingTimestampPresent:%@; masterKeyPresent:%@; networkNamePresent:%@; " - @"extendedPanIdPresent:%@; meshLocalPrefixPresent:%@; delayPresent:%@; panIdPresent:%@; " - @"channelPresent:%@; pskcPresent:%@; securityPolicyPresent:%@; channelMaskPresent:%@; >", - NSStringFromClass([self class]), _activeTimestampPresent, _pendingTimestampPresent, _masterKeyPresent, _networkNamePresent, - _extendedPanIdPresent, _meshLocalPrefixPresent, _delayPresent, _panIdPresent, _channelPresent, _pskcPresent, - _securityPolicyPresent, _channelMaskPresent]; + stringWithFormat:@"<%@: activeTimestampPresent:%@; pendingTimestampPresent:%@; masterKeyPresent:%@; networkNamePresent:%@; " + @"extendedPanIdPresent:%@; meshLocalPrefixPresent:%@; delayPresent:%@; panIdPresent:%@; " + @"channelPresent:%@; pskcPresent:%@; securityPolicyPresent:%@; channelMaskPresent:%@; >", + NSStringFromClass([self class]), _activeTimestampPresent, _pendingTimestampPresent, _masterKeyPresent, _networkNamePresent, + _extendedPanIdPresent, _meshLocalPrefixPresent, _delayPresent, _panIdPresent, _channelPresent, _pskcPresent, + _securityPolicyPresent, _channelMaskPresent]; return descriptionString; } @@ -1079,7 +1079,7 @@ - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: extAddress:%@; rloc16:%@; routerId:%@; nextHop:%@; pathCost:%@; lqiIn:%@; lqiOut:%@; " - @"age:%@; allocated:%@; linkEstablished:%@; >", + @"age:%@; allocated:%@; linkEstablished:%@; >", NSStringFromClass([self class]), _extAddress, _rloc16, _routerId, _nextHop, _pathCost, _lqiIn, _lqiOut, _age, _allocated, _linkEstablished]; return descriptionString; @@ -1524,7 +1524,7 @@ - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySetID:%@; groupKeySecurityPolicy:%@; epochKey0:%@; epochStartTime0:%@; " - @"epochKey1:%@; epochStartTime1:%@; epochKey2:%@; epochStartTime2:%@; >", + @"epochKey1:%@; epochStartTime1:%@; epochKey2:%@; epochStartTime2:%@; >", NSStringFromClass([self class]), _groupKeySetID, _groupKeySecurityPolicy, [_epochKey0 base64EncodedStringWithOptions:0], _epochStartTime0, [_epochKey1 base64EncodedStringWithOptions:0], _epochStartTime1, [_epochKey2 base64EncodedStringWithOptions:0], _epochStartTime2]; @@ -1718,9 +1718,9 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat: - @"<%@: lockOperationType:%@; operationSource:%@; userIndex:%@; fabricIndex:%@; sourceNode:%@; credentials:%@; >", - NSStringFromClass([self class]), _lockOperationType, _operationSource, _userIndex, _fabricIndex, _sourceNode, _credentials]; + stringWithFormat: + @"<%@: lockOperationType:%@; operationSource:%@; userIndex:%@; fabricIndex:%@; sourceNode:%@; credentials:%@; >", + NSStringFromClass([self class]), _lockOperationType, _operationSource, _userIndex, _fabricIndex, _sourceNode, _credentials]; return descriptionString; } @@ -1751,7 +1751,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: lockOperationType:%@; operationSource:%@; operationError:%@; " - @"userIndex:%@; fabricIndex:%@; sourceNode:%@; credentials:%@; >", + @"userIndex:%@; fabricIndex:%@; sourceNode:%@; credentials:%@; >", NSStringFromClass([self class]), _lockOperationType, _operationSource, _operationError, _userIndex, _fabricIndex, _sourceNode, _credentials]; return descriptionString; @@ -1784,7 +1784,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: lockDataType:%@; dataOperationType:%@; operationSource:%@; " - @"userIndex:%@; fabricIndex:%@; sourceNode:%@; dataIndex:%@; >", + @"userIndex:%@; fabricIndex:%@; sourceNode:%@; dataIndex:%@; >", NSStringFromClass([self class]), _lockDataType, _dataOperationType, _operationSource, _userIndex, _fabricIndex, _sourceNode, _dataIndex]; return descriptionString; @@ -2225,7 +2225,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: width:%@; height:%@; metric:%@; >", NSStringFromClass([self class]), _width, _height, _metric]; + stringWithFormat:@"<%@: width:%@; height:%@; metric:%@; >", NSStringFromClass([self class]), _width, _height, _metric]; return descriptionString; } @@ -2311,7 +2311,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: imageUrl:%@; color:%@; size:%@; >", NSStringFromClass([self class]), _imageUrl, _color, _size]; + stringWithFormat:@"<%@: imageUrl:%@; color:%@; size:%@; >", NSStringFromClass([self class]), _imageUrl, _color, _size]; return descriptionString; } @@ -2364,7 +2364,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: index:%@; outputType:%@; name:%@; >", NSStringFromClass([self class]), _index, _outputType, _name]; + stringWithFormat:@"<%@: index:%@; outputType:%@; name:%@; >", NSStringFromClass([self class]), _index, _outputType, _name]; return descriptionString; } @@ -2406,7 +2406,7 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: application:%@; endpoint:%@; >", NSStringFromClass([self class]), _application, _endpoint]; + stringWithFormat:@"<%@: application:%@; endpoint:%@; >", NSStringFromClass([self class]), _application, _endpoint]; return descriptionString; } @@ -2494,12 +2494,12 @@ - (instancetype)init - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: fabricSensitiveInt8u:%@; optionalFabricSensitiveInt8u:%@; nullableFabricSensitiveInt8u:%@; " - @"nullableOptionalFabricSensitiveInt8u:%@; fabricSensitiveCharString:%@; fabricSensitiveStruct:%@; " - @"fabricSensitiveInt8uList:%@; fabricIndex:%@; >", - NSStringFromClass([self class]), _fabricSensitiveInt8u, _optionalFabricSensitiveInt8u, _nullableFabricSensitiveInt8u, - _nullableOptionalFabricSensitiveInt8u, _fabricSensitiveCharString, _fabricSensitiveStruct, _fabricSensitiveInt8uList, - _fabricIndex]; + stringWithFormat:@"<%@: fabricSensitiveInt8u:%@; optionalFabricSensitiveInt8u:%@; nullableFabricSensitiveInt8u:%@; " + @"nullableOptionalFabricSensitiveInt8u:%@; fabricSensitiveCharString:%@; fabricSensitiveStruct:%@; " + @"fabricSensitiveInt8uList:%@; fabricIndex:%@; >", + NSStringFromClass([self class]), _fabricSensitiveInt8u, _optionalFabricSensitiveInt8u, _nullableFabricSensitiveInt8u, + _nullableOptionalFabricSensitiveInt8u, _fabricSensitiveCharString, _fabricSensitiveStruct, _fabricSensitiveInt8uList, + _fabricIndex]; return descriptionString; } @@ -2541,8 +2541,8 @@ - (NSString *)description { NSString * descriptionString = [NSString stringWithFormat:@"<%@: nullableInt:%@; optionalInt:%@; nullableOptionalInt:%@; nullableString:%@; " - @"optionalString:%@; nullableOptionalString:%@; nullableStruct:%@; optionalStruct:%@; " - @"nullableOptionalStruct:%@; nullableList:%@; optionalList:%@; nullableOptionalList:%@; >", + @"optionalString:%@; nullableOptionalString:%@; nullableStruct:%@; optionalStruct:%@; " + @"nullableOptionalStruct:%@; nullableList:%@; optionalList:%@; nullableOptionalList:%@; >", NSStringFromClass([self class]), _nullableInt, _optionalInt, _nullableOptionalInt, _nullableString, _optionalString, _nullableOptionalString, _nullableStruct, _optionalStruct, _nullableOptionalStruct, _nullableList, _optionalList, _nullableOptionalList]; diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 5e781f83cadc06..b74d0f9eea95c9 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -563,28 +563,30 @@ - (void)test008_InvokeCommandFailure MTRDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); - NSDictionary * fields = @{ - @"type" : @"Structure", - @"value" : @[ - @{ @"contextTag" : @0, @"data" : @ { @"type" : @"UnsignedInteger", @"value" : @0 } }, - @{ @"contextTag" : @1, @"data" : @ { @"type" : @"UnsignedInteger", @"value" : @10 } } + NSDictionary * fields = @ { +@"type" : + @"Structure", +@"value" : + @[ +@{ @"contextTag" : @0, @"data" : @ { @"type" : @"UnsignedInteger", @"value" : @0 } }, +@{ @"contextTag" : @1, @"data" : @ { @"type" : @"UnsignedInteger", @"value" : @10 } } ] }; [device - invokeCommandWithEndpointId:@1 - clusterId:@8 - commandId:@40000 - commandFields:fields - timedInvokeTimeout:nil - clientQueue:queue - completion:^(id _Nullable values, NSError * _Nullable error) { - NSLog(@"invoke command: MoveToLevelWithOnOff values: %@, error: %@", values, error); - - XCTAssertNil(values); - XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND); - - [expectation fulfill]; - }]; + invokeCommandWithEndpointId:@1 + clusterId:@8 + commandId:@40000 + commandFields:fields + timedInvokeTimeout:nil + clientQueue:queue + completion:^(id _Nullable values, NSError * _Nullable error) { + NSLog(@"invoke command: MoveToLevelWithOnOff values: %@, error: %@", values, error); + + XCTAssertNil(values); + XCTAssertEqual([MTRErrorTestUtils errorToZCLErrorCode:error], EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND); + + [expectation fulfill]; + }]; [self waitForExpectations:[NSArray arrayWithObject:expectation] timeout:kTimeoutInSeconds]; } diff --git a/src/darwin/Framework/CHIPTests/MTRThreadOperationalDatasetTests.mm b/src/darwin/Framework/CHIPTests/MTRThreadOperationalDatasetTests.mm index 894478eecae035..799cc05499ab4d 100644 --- a/src/darwin/Framework/CHIPTests/MTRThreadOperationalDatasetTests.mm +++ b/src/darwin/Framework/CHIPTests/MTRThreadOperationalDatasetTests.mm @@ -37,12 +37,12 @@ - (void)testThreadOperationalDataset const unsigned char PKSc[] = { 0xc4, 0xa3, 0x81, 0x25, 0x94, 0x77, 0x81, 0x99, 0x6e, 0xf5, 0x61, 0xdf, 0x8f, 0xb7, 0x8d, 0x23 }; const uint16_t panID = 0x28f4; MTRThreadOperationalDataset * dataset = [[MTRThreadOperationalDataset alloc] - initWithNetworkName:@"TestNetwork" - extendedPANID:[NSData dataWithBytes:&extendedPANID length:MTRSizeThreadExtendedPanId] - masterKey:[NSData dataWithBytes:&masterKey length:MTRSizeThreadMasterKey] - PSKc:[NSData dataWithBytes:&PKSc length:MTRSizeThreadPSKc] - channel:25 - panID:[NSData dataWithBytes:&panID length:sizeof(panID)]]; + initWithNetworkName:@"TestNetwork" + extendedPANID:[NSData dataWithBytes:&extendedPANID length:MTRSizeThreadExtendedPanId] + masterKey:[NSData dataWithBytes:&masterKey length:MTRSizeThreadMasterKey] + PSKc:[NSData dataWithBytes:&PKSc length:MTRSizeThreadPSKc] + channel:25 + panID:[NSData dataWithBytes:&panID length:sizeof(panID)]]; XCTAssertNotNil(dataset); NSData * data = [dataset data]; XCTAssertNotNil(data); @@ -65,11 +65,11 @@ - (void)testThreadOperationalDatasetInvalid const uint16_t panID = 0x0; MTRThreadOperationalDataset * dataset = [[MTRThreadOperationalDataset alloc] initWithNetworkName:@"TestNetwork" - extendedPANID:[NSData dataWithBytes:&extendedPANID length:sizeof(extendedPANID)] - masterKey:[NSData dataWithBytes:&masterKey length:sizeof(masterKey)] - PSKc:[NSData dataWithBytes:&PKSc length:sizeof(PKSc)] - channel:25 - panID:[NSData dataWithBytes:&panID length:sizeof(panID)]]; + extendedPANID:[NSData dataWithBytes:&extendedPANID length:sizeof(extendedPANID)] + masterKey:[NSData dataWithBytes:&masterKey length:sizeof(masterKey)] + PSKc:[NSData dataWithBytes:&PKSc length:sizeof(PKSc)] + channel:25 + panID:[NSData dataWithBytes:&panID length:sizeof(panID)]]; XCTAssertNil(dataset); } diff --git a/src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m b/src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m index 3b3b3bc26ac38a..94db46516d28bb 100644 --- a/src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m +++ b/src/darwin/Framework/CHIPTests/MTRXPCListenerSampleTests.m @@ -910,25 +910,25 @@ - (void)test007_InvokeCommandFailure dispatch_queue_t queue = dispatch_get_main_queue(); NSDictionary *fields = [NSDictionary dictionaryWithObjectsAndKeys: - @"Structure", @"type", - [NSArray arrayWithObjects: - [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithUnsignedInteger:0], @"tag", - [NSDictionary dictionaryWithObjectsAndKeys: - @"UnsignedInteger", @"type", - [NSNumber numberWithUnsignedInteger:0], @"value", nil], @"value", nil], - [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithUnsignedInteger:1], @"tag", - [NSDictionary dictionaryWithObjectsAndKeys: - @"UnsignedInteger", @"type", - [NSNumber numberWithUnsignedInteger:10], @"value", nil], @"value", nil], - nil], @"value", nil]; + @"Structure", @"type", + [NSArray arrayWithObjects: + [NSDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithUnsignedInteger:0], @"tag", + [NSDictionary dictionaryWithObjectsAndKeys: + @"UnsignedInteger", @"type", + [NSNumber numberWithUnsignedInteger:0], @"value", nil], @"value", nil], + [NSDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithUnsignedInteger:1], @"tag", + [NSDictionary dictionaryWithObjectsAndKeys: + @"UnsignedInteger", @"type", + [NSNumber numberWithUnsignedInteger:10], @"value", nil], @"value", nil], + nil], @"value", nil]; [device invokeCommandWithEndpointId:@1 clusterId:@8 commandId:@40000 commandFields:fields clientQueue:queue - timedInvokeTimeout:nil - completion:^(id _Nullable values, NSError * _Nullable error) { - NSLog(@"invoke command: MoveToLevelWithOnOff values: %@, error: %@", values, error); + timedInvokeTimeout:nil + completion:^(id _Nullable values, NSError * _Nullable error) { + NSLog(@"invoke command: MoveToLevelWithOnOff values: %@, error: %@", values, error); - XCTAssertNil(values); + XCTAssertNil(values); // Error is copied over XPC and hence cannot use MTRErrorTestUtils utility which checks against a local domain string object. XCTAssertTrue([error.domain isEqualToString:MTRInteractionErrorDomain]); XCTAssertEqual(error.code, EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND); @@ -1654,25 +1654,25 @@ - (void)test013_TimedWriteAttribute expectation = [self expectationWithDescription:@"Subscribed"]; __block void (^reportHandler)(id _Nullable values, NSError * _Nullable error); [device subscribeAttributeWithEndpointId:@1 - clusterId:@8 - attributeId:@17 - minInterval:@2 - maxInterval:@10 - params:nil - clientQueue:queue - reportHandler:^(id _Nullable value, NSError * _Nullable error) { - NSLog(@"report attribute: Brightness values: %@, error: %@", value, error); - - if (reportHandler) { - __auto_type callback = reportHandler; - callback = nil; - callback(value, error); - } + clusterId:@8 + attributeId:@17 + minInterval:@2 + maxInterval:@10 + params:nil + clientQueue:queue + reportHandler:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"report attribute: Brightness values: %@, error: %@", value, error); + + if (reportHandler) { + __auto_type callback = reportHandler; + callback = nil; + callback(value, error); } - subscriptionEstablished:^{ - NSLog(@"subscribe attribute: Brightness established"); - [expectation fulfill]; - }]; + } + subscriptionEstablished:^ { + NSLog(@"subscribe attribute: Brightness established"); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; // Setup report expectation diff --git a/src/platform/Ameba/BLEManagerImpl.cpp b/src/platform/Ameba/BLEManagerImpl.cpp index 449663268152e9..27e507d4a70c65 100644 --- a/src/platform/Ameba/BLEManagerImpl.cpp +++ b/src/platform/Ameba/BLEManagerImpl.cpp @@ -148,7 +148,7 @@ CHIP_ERROR BLEManagerImpl::_Init() VerifyOrExit(!mFlags.Has(Flags::kAMEBABLEStackInitialized), err = CHIP_ERROR_INCORRECT_STATE); err = MapBLEError(bt_matter_adapter_init()); - chip_blemgr_set_callback_func((chip_blemgr_callback)(ble_callback_dispatcher), this); + chip_blemgr_set_callback_func((chip_blemgr_callback) (ble_callback_dispatcher), this); SuccessOrExit(err); // Set related flags @@ -202,8 +202,8 @@ void BLEManagerImpl::HandleTXCharCCCDWrite(int conn_id, int indicationsEnabled, // whether the client is enabling or disabling indications. { ChipDeviceEvent event; - event.Type = (indicationsEnabled || notificationsEnabled) ? DeviceEventType::kCHIPoBLESubscribe - : DeviceEventType::kCHIPoBLEUnsubscribe; + event.Type = (indicationsEnabled || notificationsEnabled) ? DeviceEventType::kCHIPoBLESubscribe + : DeviceEventType::kCHIPoBLEUnsubscribe; event.CHIPoBLESubscribe.ConId = conn_id; PlatformMgr().PostEventOrDie(&event); } diff --git a/src/platform/Darwin/BleConnectionDelegateImpl.mm b/src/platform/Darwin/BleConnectionDelegateImpl.mm index 22f97cef79c54f..8dfa48cae2d796 100644 --- a/src/platform/Darwin/BleConnectionDelegateImpl.mm +++ b/src/platform/Darwin/BleConnectionDelegateImpl.mm @@ -64,31 +64,31 @@ - (void)stop; namespace chip { namespace DeviceLayer { - namespace Internal { - BleConnection * ble; - - void BleConnectionDelegateImpl::NewConnection(Ble::BleLayer * bleLayer, void * appState, const uint16_t deviceDiscriminator) - { - ChipLogProgress(Ble, "%s", __FUNCTION__); - CancelConnection(); - ble = [[BleConnection alloc] initWithDiscriminator:deviceDiscriminator]; - [ble setBleLayer:bleLayer]; - ble.appState = appState; - ble.onConnectionComplete = OnConnectionComplete; - ble.onConnectionError = OnConnectionError; - ble.centralManager = [ble.centralManager initWithDelegate:ble queue:ble.workQueue]; - } +namespace Internal { +BleConnection * ble; - CHIP_ERROR BleConnectionDelegateImpl::CancelConnection() - { - ChipLogProgress(Ble, "%s", __FUNCTION__); - if (ble) { - [ble stop]; - ble = nil; - } - return CHIP_NO_ERROR; - } - } // namespace Internal +void BleConnectionDelegateImpl::NewConnection(Ble::BleLayer * bleLayer, void * appState, const uint16_t deviceDiscriminator) +{ + ChipLogProgress(Ble, "%s", __FUNCTION__); + CancelConnection(); + ble = [[BleConnection alloc] initWithDiscriminator:deviceDiscriminator]; + [ble setBleLayer:bleLayer]; + ble.appState = appState; + ble.onConnectionComplete = OnConnectionComplete; + ble.onConnectionError = OnConnectionError; + ble.centralManager = [ble.centralManager initWithDelegate:ble queue:ble.workQueue]; +} + +CHIP_ERROR BleConnectionDelegateImpl::CancelConnection() +{ + ChipLogProgress(Ble, "%s", __FUNCTION__); + if (ble) { + [ble stop]; + ble = nil; + } + return CHIP_NO_ERROR; +} +} // namespace Internal } // namespace DeviceLayer } // namespace chip @@ -109,7 +109,7 @@ - (id)initWithDiscriminator:(uint16_t)deviceDiscriminator _centralManager = [CBCentralManager alloc]; _found = false; - dispatch_source_set_event_handler(_timer, ^{ + dispatch_source_set_event_handler(_timer, ^ { [self stop]; [self dispatchConnectionError:BLE_ERROR_APP_CLOSED_CONNECTION]; }); @@ -123,14 +123,14 @@ - (id)initWithDiscriminator:(uint16_t)deviceDiscriminator // All our callback dispatch must happen on _chipWorkQueue - (void)dispatchConnectionError:(CHIP_ERROR)error { - dispatch_async(_chipWorkQueue, ^{ + dispatch_async(_chipWorkQueue, ^ { self.onConnectionError(self.appState, error); }); } - (void)dispatchConnectionComplete:(CBPeripheral *)peripheral { - dispatch_async(_chipWorkQueue, ^{ + dispatch_async(_chipWorkQueue, ^ { self.onConnectionComplete(self.appState, (__bridge void *) peripheral); }); } @@ -166,8 +166,8 @@ - (void)centralManagerDidUpdateState:(CBCentralManager *)central - (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral - advertisementData:(NSDictionary *)advertisementData - RSSI:(NSNumber *)RSSI + advertisementData:(NSDictionary *)advertisementData + RSSI:(NSNumber *)RSSI { NSNumber * isConnectable = [advertisementData objectForKey:CBAdvertisementDataIsConnectable]; if ([isConnectable boolValue]) { @@ -251,19 +251,19 @@ - (void)peripheral:(CBPeripheral *)peripheral didDiscoverCharacteristicsForServi - (void)peripheral:(CBPeripheral *)peripheral didWriteValueForCharacteristic:(CBCharacteristic *)characteristic - error:(NSError *)error + error:(NSError *)error { if (nil == error) { chip::Ble::ChipBleUUID svcId; chip::Ble::ChipBleUUID charId; [BleConnection fillServiceWithCharacteristicUuids:characteristic svcId:&svcId charId:&charId]; - dispatch_async(_chipWorkQueue, ^{ + dispatch_async(_chipWorkQueue, ^ { _mBleLayer->HandleWriteConfirmation((__bridge void *) peripheral, &svcId, &charId); }); } else { ChipLogError( Ble, "BLE:Error writing Characteristics in Chip service on the device: [%s]", [error.localizedDescription UTF8String]); - dispatch_async(_chipWorkQueue, ^{ + dispatch_async(_chipWorkQueue, ^ { _mBleLayer->HandleConnectionError((__bridge void *) peripheral, BLE_ERROR_GATT_WRITE_FAILED); }); } @@ -271,7 +271,7 @@ - (void)peripheral:(CBPeripheral *)peripheral - (void)peripheral:(CBPeripheral *)peripheral didUpdateNotificationStateForCharacteristic:(CBCharacteristic *)characteristic - error:(NSError *)error + error:(NSError *)error { bool isNotifying = characteristic.isNotifying; @@ -280,7 +280,7 @@ - (void)peripheral:(CBPeripheral *)peripheral chip::Ble::ChipBleUUID charId; [BleConnection fillServiceWithCharacteristicUuids:characteristic svcId:&svcId charId:&charId]; - dispatch_async(_chipWorkQueue, ^{ + dispatch_async(_chipWorkQueue, ^ { if (isNotifying) { _mBleLayer->HandleSubscribeComplete((__bridge void *) peripheral, &svcId, &charId); } else { @@ -289,8 +289,8 @@ - (void)peripheral:(CBPeripheral *)peripheral }); } else { ChipLogError(Ble, "BLE:Error subscribing/unsubcribing some characteristic on the device: [%s]", - [error.localizedDescription UTF8String]); - dispatch_async(_chipWorkQueue, ^{ + [error.localizedDescription UTF8String]); + dispatch_async(_chipWorkQueue, ^ { if (isNotifying) { // we're still notifying, so we must failed the unsubscription _mBleLayer->HandleConnectionError((__bridge void *) peripheral, BLE_ERROR_GATT_UNSUBSCRIBE_FAILED); @@ -304,7 +304,7 @@ - (void)peripheral:(CBPeripheral *)peripheral - (void)peripheral:(CBPeripheral *)peripheral didUpdateValueForCharacteristic:(CBCharacteristic *)characteristic - error:(NSError *)error + error:(NSError *)error { if (nil == error) { chip::Ble::ChipBleUUID svcId; @@ -316,7 +316,7 @@ - (void)peripheral:(CBPeripheral *)peripheral = chip::System::PacketBufferHandle::NewWithData(characteristic.value.bytes, characteristic.value.length); if (!msgBuf.IsNull()) { - dispatch_async(_chipWorkQueue, ^{ + dispatch_async(_chipWorkQueue, ^ { if (!_mBleLayer->HandleIndicationReceived((__bridge void *) peripheral, &svcId, &charId, std::move(msgBuf))) { // since this error comes from device manager core // we assume it would do the right thing, like closing the connection @@ -325,14 +325,14 @@ - (void)peripheral:(CBPeripheral *)peripheral }); } else { ChipLogError(Ble, "Failed at allocating buffer for incoming BLE data"); - dispatch_async(_chipWorkQueue, ^{ + dispatch_async(_chipWorkQueue, ^ { _mBleLayer->HandleConnectionError((__bridge void *) peripheral, CHIP_ERROR_NO_MEMORY); }); } } else { ChipLogError( Ble, "BLE:Error receiving indication of Characteristics on the device: [%s]", [error.localizedDescription UTF8String]); - dispatch_async(_chipWorkQueue, ^{ + dispatch_async(_chipWorkQueue, ^ { _mBleLayer->HandleConnectionError((__bridge void *) peripheral, BLE_ERROR_GATT_INDICATE_FAILED); }); } @@ -403,12 +403,12 @@ - (void)disconnect * */ + (void)fillServiceWithCharacteristicUuids:(CBCharacteristic *)characteristic - svcId:(chip::Ble::ChipBleUUID *)svcId - charId:(chip::Ble::ChipBleUUID *)charId + svcId:(chip::Ble::ChipBleUUID *)svcId + charId:(chip::Ble::ChipBleUUID *)charId { static const size_t FullUUIDLength = 16; if ((FullUUIDLength != sizeof(charId->bytes)) || (FullUUIDLength != sizeof(svcId->bytes)) - || (FullUUIDLength != characteristic.UUID.data.length)) { + || (FullUUIDLength != characteristic.UUID.data.length)) { // we're dead. we expect the data length to be the same (16-byte) across the board ChipLogError(Ble, "UUID of characteristic is incompatible"); return; @@ -431,7 +431,7 @@ + (void)fillServiceWithCharacteristicUuids:(CBCharacteristic *)characteristic memcpy(serviceFullUUID + 2, characteristic.service.UUID.data.bytes, 2); break; case 4: - // flow through + // flow through case 16: memcpy(serviceFullUUID, characteristic.service.UUID.data.bytes, characteristic.service.UUID.data.length); break; diff --git a/src/platform/Darwin/WiFi/ConnectivityManagerImplWiFi.mm b/src/platform/Darwin/WiFi/ConnectivityManagerImplWiFi.mm index 99974e72f158d6..295060b2402275 100644 --- a/src/platform/Darwin/WiFi/ConnectivityManagerImplWiFi.mm +++ b/src/platform/Darwin/WiFi/ConnectivityManagerImplWiFi.mm @@ -43,70 +43,74 @@ namespace chip { namespace DeviceLayer { - CHIP_ERROR ConnectivityManagerImpl::ConnectWiFiNetwork(WiFiNetworkInfos & infos) - { - auto interface = GetDefaultWiFiInterface(); - VerifyOrReturnError(interface != nil, CHIP_ERROR_INCORRECT_STATE); - - auto ssidData = [NSData dataWithBytes:infos.ssid length:infos.ssidLen]; - NSError * error = nil; - auto networks = [[interface scanForNetworksWithSSID:ssidData error:&error] allObjects]; - VerifyOrReturnError(error == nil, CHIP_ERROR_INTERNAL); - VerifyOrReturnError([networks count] != 0, CHIP_ERROR_KEY_NOT_FOUND); - - auto credentialsData = [NSData dataWithBytes:infos.credentials length:infos.credentialsLen]; - auto credentials = [[NSString alloc] initWithData:credentialsData encoding:NSUTF8StringEncoding]; - for (CWNetwork * network in networks) { - if ([interface associateToNetwork:network password:credentials error:&error]) { - return CHIP_NO_ERROR; - } +CHIP_ERROR ConnectivityManagerImpl::ConnectWiFiNetwork(WiFiNetworkInfos & infos) +{ + auto interface = GetDefaultWiFiInterface(); + VerifyOrReturnError(interface != nil, CHIP_ERROR_INCORRECT_STATE); + + auto ssidData = [NSData dataWithBytes:infos.ssid length:infos.ssidLen]; + NSError * error = nil; + auto networks = [[interface scanForNetworksWithSSID:ssidData error:&error] allObjects]; + VerifyOrReturnError(error == nil, CHIP_ERROR_INTERNAL); + VerifyOrReturnError([networks count] != 0, CHIP_ERROR_KEY_NOT_FOUND); + + auto credentialsData = [NSData dataWithBytes:infos.credentials length:infos.credentialsLen]; + auto credentials = [[NSString alloc] initWithData:credentialsData encoding:NSUTF8StringEncoding]; + for (CWNetwork * network in networks) { + if ([interface associateToNetwork:network password:credentials error:&error]) { + return CHIP_NO_ERROR; } - - return CHIP_ERROR_NOT_CONNECTED; } - ConnectivityManagerImpl::WiFiStationMode ConnectivityManagerImpl::_GetWiFiStationMode() - { - auto interface = GetDefaultWiFiInterface(); - VerifyOrReturnError(interface != nil, kWiFiStationMode_Disabled); - return kWiFiStationMode_Enabled; - } + return CHIP_ERROR_NOT_CONNECTED; +} - CHIP_ERROR ConnectivityManagerImpl::_SetWiFiStationMode(WiFiStationMode val) { return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } +ConnectivityManagerImpl::WiFiStationMode ConnectivityManagerImpl::_GetWiFiStationMode() +{ + auto interface = GetDefaultWiFiInterface(); + VerifyOrReturnError(interface != nil, kWiFiStationMode_Disabled); + return kWiFiStationMode_Enabled; +} - bool ConnectivityManagerImpl::_IsWiFiStationConnected() - { - bool status = false; +CHIP_ERROR ConnectivityManagerImpl::_SetWiFiStationMode(WiFiStationMode val) { + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} - if (_GetWiFiStationMode() == kWiFiStationMode_Enabled) { - char interfaceName[IFNAMSIZ]; - VerifyOrReturnError(CHIP_NO_ERROR == GetWiFiInterfaceName(interfaceName, sizeof(interfaceName)), false); - VerifyOrReturnError(CHIP_NO_ERROR == GetInterfaceStatus(interfaceName, &status), false); - } +bool ConnectivityManagerImpl::_IsWiFiStationConnected() +{ + bool status = false; - return status; + if (_GetWiFiStationMode() == kWiFiStationMode_Enabled) { + char interfaceName[IFNAMSIZ]; + VerifyOrReturnError(CHIP_NO_ERROR == GetWiFiInterfaceName(interfaceName, sizeof(interfaceName)), false); + VerifyOrReturnError(CHIP_NO_ERROR == GetInterfaceStatus(interfaceName, &status), false); } - bool ConnectivityManagerImpl::_IsWiFiStationProvisioned() - { - return ConfigurationManagerImpl::GetDefaultInstance().HasWiFiNetworkInformations(); - } + return status; +} - void ConnectivityManagerImpl::_ClearWiFiStationProvision() - { - ConfigurationManagerImpl::GetDefaultInstance().ClearWiFiNetworkInformations(); - } +bool ConnectivityManagerImpl::_IsWiFiStationProvisioned() +{ + return ConfigurationManagerImpl::GetDefaultInstance().HasWiFiNetworkInformations(); +} + +void ConnectivityManagerImpl::_ClearWiFiStationProvision() +{ + ConfigurationManagerImpl::GetDefaultInstance().ClearWiFiNetworkInformations(); +} - bool ConnectivityManagerImpl::_CanStartWiFiScan() { return _IsWiFiStationConnected(); } +bool ConnectivityManagerImpl::_CanStartWiFiScan() { + return _IsWiFiStationConnected(); +} - CHIP_ERROR ConnectivityManagerImpl::GetWiFiInterfaceName(char * outName, size_t maxLen) - { - auto interface = GetDefaultWiFiInterface(); - VerifyOrReturnError(interface != nil, CHIP_ERROR_INCORRECT_STATE); +CHIP_ERROR ConnectivityManagerImpl::GetWiFiInterfaceName(char * outName, size_t maxLen) +{ + auto interface = GetDefaultWiFiInterface(); + VerifyOrReturnError(interface != nil, CHIP_ERROR_INCORRECT_STATE); - memcpy(outName, [interface.interfaceName UTF8String], maxLen); - return CHIP_NO_ERROR; - } + memcpy(outName, [interface.interfaceName UTF8String], maxLen); + return CHIP_NO_ERROR; +} } } diff --git a/src/platform/Darwin/WiFi/NetworkCommissioningWiFiDriver.mm b/src/platform/Darwin/WiFi/NetworkCommissioningWiFiDriver.mm index 94a67373de41aa..3eb1aab7e5ddaa 100644 --- a/src/platform/Darwin/WiFi/NetworkCommissioningWiFiDriver.mm +++ b/src/platform/Darwin/WiFi/NetworkCommissioningWiFiDriver.mm @@ -46,7 +46,9 @@ class DarwinScanResponseIterator : public Iterator { public: - DarwinScanResponseIterator(NSArray * networks) { mNetworks = networks; } + DarwinScanResponseIterator(NSArray * networks) { + mNetworks = networks; + } bool Next(WiFiScanResponse & scanResponse) override { @@ -61,9 +63,13 @@ bool Next(WiFiScanResponse & scanResponse) override return true; } - size_t Count() override { return [mNetworks count]; } + size_t Count() override { + return [mNetworks count]; + } - void Release() override { mNetworks = nil; } + void Release() override { + mNetworks = nil; + } private: NSArray * mNetworks = nil; @@ -131,119 +137,129 @@ WiFiBand GetWiFiBand(CWChannel * channel) namespace chip { namespace DeviceLayer { - namespace NetworkCommissioning { - CHIP_ERROR DarwinWiFiDriver::Init(BaseDriver::NetworkStatusChangeCallback * networkStatusChangeCallback) - { - auto & configurationMgr = ConfigurationManagerImpl::GetDefaultInstance(); - auto & connectivityMgr = ConnectivityMgrImpl(); - - ReturnErrorOnFailure(configurationMgr.GetWiFiNetworkInformations(mNetwork)); - if (!connectivityMgr.IsWiFiStationConnected() && connectivityMgr.IsWiFiStationProvisioned()) { - LogErrorOnFailure(connectivityMgr.ConnectWiFiNetwork(mNetwork)); - } - - mStatusChangeCallback = networkStatusChangeCallback; - return CHIP_NO_ERROR; - } +namespace NetworkCommissioning { +CHIP_ERROR DarwinWiFiDriver::Init(BaseDriver::NetworkStatusChangeCallback * networkStatusChangeCallback) +{ + auto & configurationMgr = ConfigurationManagerImpl::GetDefaultInstance(); + auto & connectivityMgr = ConnectivityMgrImpl(); + + ReturnErrorOnFailure(configurationMgr.GetWiFiNetworkInformations(mNetwork)); + if (!connectivityMgr.IsWiFiStationConnected() && connectivityMgr.IsWiFiStationProvisioned()) { + LogErrorOnFailure(connectivityMgr.ConnectWiFiNetwork(mNetwork)); + } - void DarwinWiFiDriver::Shutdown() { mStatusChangeCallback = nullptr; } + mStatusChangeCallback = networkStatusChangeCallback; + return CHIP_NO_ERROR; +} - NetworkIterator * DarwinWiFiDriver::GetNetworks() { return new DarwinWiFiNetworkIterator(); } +void DarwinWiFiDriver::Shutdown() { + mStatusChangeCallback = nullptr; +} - uint8_t DarwinWiFiDriver::GetMaxNetworks() { return kMaxNetworks; } +NetworkIterator * DarwinWiFiDriver::GetNetworks() { + return new DarwinWiFiNetworkIterator(); +} - uint8_t DarwinWiFiDriver::GetScanNetworkTimeoutSeconds() { return kScanNetworkTimeoutSeconds; } +uint8_t DarwinWiFiDriver::GetMaxNetworks() { + return kMaxNetworks; +} - uint8_t DarwinWiFiDriver::GetConnectNetworkTimeoutSeconds() { return kConnectNetworkTimeoutSeconds; } +uint8_t DarwinWiFiDriver::GetScanNetworkTimeoutSeconds() { + return kScanNetworkTimeoutSeconds; +} - CHIP_ERROR DarwinWiFiDriver::CommitConfiguration() - { - return ConfigurationManagerImpl::GetDefaultInstance().StoreWiFiNetworkInformations(mNetwork); - } +uint8_t DarwinWiFiDriver::GetConnectNetworkTimeoutSeconds() { + return kConnectNetworkTimeoutSeconds; +} - CHIP_ERROR DarwinWiFiDriver::RevertConfiguration() - { - mNetwork.Reset(); - return ConfigurationManagerImpl::GetDefaultInstance().GetWiFiNetworkInformations(mNetwork); - } +CHIP_ERROR DarwinWiFiDriver::CommitConfiguration() +{ + return ConfigurationManagerImpl::GetDefaultInstance().StoreWiFiNetworkInformations(mNetwork); +} - Status DarwinWiFiDriver::AddOrUpdateNetwork( - ByteSpan ssid, ByteSpan credentials, MutableCharSpan & outText, uint8_t & outIndex) - { - outText.reduce_size(0); - outIndex = 0; - VerifyOrReturnError(CHIP_NO_ERROR == mNetwork.Update(ssid, credentials), Status::kUnknownError); +CHIP_ERROR DarwinWiFiDriver::RevertConfiguration() +{ + mNetwork.Reset(); + return ConfigurationManagerImpl::GetDefaultInstance().GetWiFiNetworkInformations(mNetwork); +} - return Status::kSuccess; - } +Status DarwinWiFiDriver::AddOrUpdateNetwork( + ByteSpan ssid, ByteSpan credentials, MutableCharSpan & outText, uint8_t & outIndex) +{ + outText.reduce_size(0); + outIndex = 0; + VerifyOrReturnError(CHIP_NO_ERROR == mNetwork.Update(ssid, credentials), Status::kUnknownError); - Status DarwinWiFiDriver::RemoveNetwork(ByteSpan ssid, MutableCharSpan & outText, uint8_t & outIndex) - { - outText.reduce_size(0); - outIndex = 0; - VerifyOrReturnError(mNetwork.Match(ssid), Status::kNetworkIDNotFound); + return Status::kSuccess; +} - mNetwork.Reset(); +Status DarwinWiFiDriver::RemoveNetwork(ByteSpan ssid, MutableCharSpan & outText, uint8_t & outIndex) +{ + outText.reduce_size(0); + outIndex = 0; + VerifyOrReturnError(mNetwork.Match(ssid), Status::kNetworkIDNotFound); - return Status::kSuccess; - } + mNetwork.Reset(); - Status DarwinWiFiDriver::ReorderNetwork(ByteSpan ssid, uint8_t index, MutableCharSpan & outText) - { - outText.reduce_size(0); - VerifyOrReturnError(index == 0, Status::kOutOfRange); - VerifyOrReturnError(mNetwork.Match(ssid), Status::kNetworkIDNotFound); + return Status::kSuccess; +} - // We only support one network, so reorder is actually no-op. - return Status::kSuccess; - } +Status DarwinWiFiDriver::ReorderNetwork(ByteSpan ssid, uint8_t index, MutableCharSpan & outText) +{ + outText.reduce_size(0); + VerifyOrReturnError(index == 0, Status::kOutOfRange); + VerifyOrReturnError(mNetwork.Match(ssid), Status::kNetworkIDNotFound); - void DarwinWiFiDriver::ConnectNetwork(ByteSpan ssid, ConnectCallback * callback) - { - VerifyOrReturn(mNetwork.Match(ssid), DispatchConnectNetworkResponse(callback, Status::kNetworkIDNotFound)); + // We only support one network, so reorder is actually no-op. + return Status::kSuccess; +} - auto err = ConnectivityMgrImpl().ConnectWiFiNetwork(mNetwork); - VerifyOrReturn(CHIP_ERROR_KEY_NOT_FOUND != err, DispatchConnectNetworkResponse(callback, Status::kNetworkNotFound)); - VerifyOrReturn(CHIP_ERROR_NOT_CONNECTED != err, DispatchConnectNetworkResponse(callback, Status::kAuthFailure)); - VerifyOrReturn(CHIP_NO_ERROR == err, DispatchConnectNetworkResponse(callback, Status::kUnknownError)); +void DarwinWiFiDriver::ConnectNetwork(ByteSpan ssid, ConnectCallback * callback) +{ + VerifyOrReturn(mNetwork.Match(ssid), DispatchConnectNetworkResponse(callback, Status::kNetworkIDNotFound)); - DispatchConnectNetworkResponse(callback, Status::kSuccess); - } + auto err = ConnectivityMgrImpl().ConnectWiFiNetwork(mNetwork); + VerifyOrReturn(CHIP_ERROR_KEY_NOT_FOUND != err, DispatchConnectNetworkResponse(callback, Status::kNetworkNotFound)); + VerifyOrReturn(CHIP_ERROR_NOT_CONNECTED != err, DispatchConnectNetworkResponse(callback, Status::kAuthFailure)); + VerifyOrReturn(CHIP_NO_ERROR == err, DispatchConnectNetworkResponse(callback, Status::kUnknownError)); - void DarwinWiFiDriver::DispatchConnectNetworkResponse(ConnectCallback * callback, Status status) - { - if (callback) { - callback->OnResult(status, CharSpan(), 0); - } - } + DispatchConnectNetworkResponse(callback, Status::kSuccess); +} - void DarwinWiFiDriver::ScanNetworks(ByteSpan ssid, ScanCallback * callback) - { - VerifyOrReturn(callback != nullptr); // Not much we can do. +void DarwinWiFiDriver::DispatchConnectNetworkResponse(ConnectCallback * callback, Status status) +{ + if (callback) { + callback->OnResult(status, CharSpan(), 0); + } +} - auto WiFiClient = [CWWiFiClient sharedWiFiClient]; - VerifyOrReturn(WiFiClient != nil, DispatchScanNetworksResponse(callback, Status::kUnknownError)); +void DarwinWiFiDriver::ScanNetworks(ByteSpan ssid, ScanCallback * callback) +{ + VerifyOrReturn(callback != nullptr); // Not much we can do. - CWInterface * interface = [WiFiClient interface]; - VerifyOrReturn(interface != nil, DispatchScanNetworksResponse(callback, Status::kUnknownError)); + auto WiFiClient = [CWWiFiClient sharedWiFiClient]; + VerifyOrReturn(WiFiClient != nil, DispatchScanNetworksResponse(callback, Status::kUnknownError)); - NSError * error = nil; - NSData * ssidData = ssid.size() ? [NSData dataWithBytes:ssid.data() length:ssid.size()] : nil; - auto networks = [[interface scanForNetworksWithSSID:ssidData error:&error] allObjects]; - VerifyOrReturn(error == nil, DispatchScanNetworksResponse(callback, Status::kUnknownError)); - VerifyOrReturn([networks count] != 0, DispatchScanNetworksResponse(callback, Status::kSuccess)); + CWInterface * interface = [WiFiClient interface]; + VerifyOrReturn(interface != nil, DispatchScanNetworksResponse(callback, Status::kUnknownError)); - DarwinScanResponseIterator iter(networks); - DispatchScanNetworksResponse(callback, Status::kSuccess, &iter); - } + NSError * error = nil; + NSData * ssidData = ssid.size() ? [NSData dataWithBytes:ssid.data() length:ssid.size()] : nil; + auto networks = [[interface scanForNetworksWithSSID:ssidData error:&error] allObjects]; + VerifyOrReturn(error == nil, DispatchScanNetworksResponse(callback, Status::kUnknownError)); + VerifyOrReturn([networks count] != 0, DispatchScanNetworksResponse(callback, Status::kSuccess)); - void DarwinWiFiDriver::DispatchScanNetworksResponse( - ScanCallback * callback, Status status, Iterator * responses) - { - if (callback) { - callback->OnFinished(status, CharSpan(), responses); - } - } - } // namespace NetworkCommissioning + DarwinScanResponseIterator iter(networks); + DispatchScanNetworksResponse(callback, Status::kSuccess, &iter); +} + +void DarwinWiFiDriver::DispatchScanNetworksResponse( + ScanCallback * callback, Status status, Iterator * responses) +{ + if (callback) { + callback->OnFinished(status, CharSpan(), responses); + } +} +} // namespace NetworkCommissioning } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/ESP32/nimble/BLEManagerImpl.cpp b/src/platform/ESP32/nimble/BLEManagerImpl.cpp index 8952ac48662e2c..d7dc556764af7c 100644 --- a/src/platform/ESP32/nimble/BLEManagerImpl.cpp +++ b/src/platform/ESP32/nimble/BLEManagerImpl.cpp @@ -847,8 +847,8 @@ void BLEManagerImpl::HandleTXCharCCCDWrite(struct ble_gap_event * gapEvent) // whether the client is enabling or disabling indications. { ChipDeviceEvent event; - event.Type = (indicationsEnabled || notificationsEnabled) ? DeviceEventType::kCHIPoBLESubscribe - : DeviceEventType::kCHIPoBLEUnsubscribe; + event.Type = (indicationsEnabled || notificationsEnabled) ? DeviceEventType::kCHIPoBLESubscribe + : DeviceEventType::kCHIPoBLEUnsubscribe; event.CHIPoBLESubscribe.ConId = gapEvent->subscribe.conn_handle; err = PlatformMgr().PostEvent(&event); } diff --git a/src/platform/Tizen/BLEManagerImpl.cpp b/src/platform/Tizen/BLEManagerImpl.cpp index af9f473baba074..964395be93c29f 100644 --- a/src/platform/Tizen/BLEManagerImpl.cpp +++ b/src/platform/Tizen/BLEManagerImpl.cpp @@ -525,8 +525,8 @@ int BLEManagerImpl::RegisterGATTServer() ret = bt_gatt_characteristic_create( chip_ble_char_c1_tx_uuid, BT_GATT_PERMISSION_WRITE, BT_GATT_PROPERTY_WRITE, // Write Request is not coming if we use WITHOUT_RESPONSE property. Let's use WRITE property and - // consider to use WITHOUT_RESPONSE property in the future according to the CHIP Spec 4.16.3.2. BTP - // GATT Service + // consider to use WITHOUT_RESPONSE property in the future according to the CHIP Spec 4.16.3.2. BTP + // GATT Service "CHIPoBLE_C1", strlen("CHIPoBLE_C1"), &char1); VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_characteristic_create() failed. ret: %d", ret)); diff --git a/src/platform/Zephyr/BLEManagerImpl.cpp b/src/platform/Zephyr/BLEManagerImpl.cpp index b95fcccdbeca79..04956eddf144ca 100644 --- a/src/platform/Zephyr/BLEManagerImpl.cpp +++ b/src/platform/Zephyr/BLEManagerImpl.cpp @@ -75,20 +75,20 @@ _bt_gatt_ccc CHIPoBLEChar_TX_CCC = BT_GATT_CCC_INITIALIZER(nullptr, BLEManagerIm struct bt_gatt_attr sChipoBleAttributes[] = { BT_GATT_PRIMARY_SERVICE(&UUID16_CHIPoBLEService.uuid), - BT_GATT_CHARACTERISTIC(&UUID128_CHIPoBLEChar_RX.uuid, - BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP, - BT_GATT_PERM_READ | BT_GATT_PERM_WRITE, - nullptr, BLEManagerImpl::HandleRXWrite, nullptr), - BT_GATT_CHARACTERISTIC(&UUID128_CHIPoBLEChar_TX.uuid, - BT_GATT_CHRC_INDICATE, - BT_GATT_PERM_NONE, - nullptr, nullptr, nullptr), - BT_GATT_CCC_MANAGED(&CHIPoBLEChar_TX_CCC, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE), + BT_GATT_CHARACTERISTIC(&UUID128_CHIPoBLEChar_RX.uuid, + BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP, + BT_GATT_PERM_READ | BT_GATT_PERM_WRITE, + nullptr, BLEManagerImpl::HandleRXWrite, nullptr), + BT_GATT_CHARACTERISTIC(&UUID128_CHIPoBLEChar_TX.uuid, + BT_GATT_CHRC_INDICATE, + BT_GATT_PERM_NONE, + nullptr, nullptr, nullptr), + BT_GATT_CCC_MANAGED(&CHIPoBLEChar_TX_CCC, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE), #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING - BT_GATT_CHARACTERISTIC(&UUID128_CHIPoBLEChar_C3.uuid, - BT_GATT_CHRC_READ, - BT_GATT_PERM_READ, - BLEManagerImpl::HandleC3Read, nullptr, nullptr), + BT_GATT_CHARACTERISTIC(&UUID128_CHIPoBLEChar_C3.uuid, + BT_GATT_CHRC_READ, + BT_GATT_PERM_READ, + BLEManagerImpl::HandleC3Read, nullptr, nullptr), #endif }; diff --git a/src/platform/bouffalolab/BL602/BLEManagerImpl.cpp b/src/platform/bouffalolab/BL602/BLEManagerImpl.cpp index 947598e0d8c4f5..aa1d2f441ba669 100644 --- a/src/platform/bouffalolab/BL602/BLEManagerImpl.cpp +++ b/src/platform/bouffalolab/BL602/BLEManagerImpl.cpp @@ -41,10 +41,10 @@ extern "C" { #if 0 // BaseType_t xPortIsInsideInterrupt(void) __attribute__((weak, alias("_xPortIsInsideInterrupt"))); // BaseType_t _xPortIsInsideInterrupt(void) -BaseType_t xPortIsInsideInterrupt(void) -{ - return TrapNetCounter ? 1 : 0; -} + BaseType_t xPortIsInsideInterrupt(void) + { + return TrapNetCounter ? 1 : 0; + } #endif } @@ -86,17 +86,17 @@ _bt_gatt_ccc CHIPoBLEChar_TX_CCC = BT_GATT_CCC_INITIALIZER(nullptr, BLEManagerIm // clang-format off BT_GATT_SERVICE_DEFINE(_3_CHIPoBLE_Service, - BT_GATT_PRIMARY_SERVICE(&UUID16_CHIPoBLEService.uuid), - BT_GATT_CHARACTERISTIC(&UUID128_CHIPoBLEChar_RX.uuid, + BT_GATT_PRIMARY_SERVICE(&UUID16_CHIPoBLEService.uuid), + BT_GATT_CHARACTERISTIC(&UUID128_CHIPoBLEChar_RX.uuid, BT_GATT_CHRC_WRITE | BT_GATT_CHRC_WRITE_WITHOUT_RESP, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE, nullptr, BLEManagerImpl::HandleRXWrite, nullptr), - BT_GATT_CHARACTERISTIC(&UUID128_CHIPoBLEChar_TX.uuid, + BT_GATT_CHARACTERISTIC(&UUID128_CHIPoBLEChar_TX.uuid, BT_GATT_CHRC_NOTIFY, BT_GATT_PERM_NONE, nullptr, nullptr, nullptr), - BT_GATT_CCC_MANAGED(&CHIPoBLEChar_TX_CCC, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE) -); + BT_GATT_CCC_MANAGED(&CHIPoBLEChar_TX_CCC, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE) + ); // static struct bt_gatt_attr attr = BT_GATT_PRIMARY_SERVICE(UUID16_CHIPoBLEService); diff --git a/src/platform/webos/BLEManagerImpl.cpp b/src/platform/webos/BLEManagerImpl.cpp index e98e38ba3ab35b..02b821613881dd 100644 --- a/src/platform/webos/BLEManagerImpl.cpp +++ b/src/platform/webos/BLEManagerImpl.cpp @@ -528,7 +528,7 @@ bool BLEManagerImpl::SubscribeCharacteristic(BLE_CONNECTION_OBJECT conId, const { bool result = false; result = SubscribeCharacteristicToWebOS(conId, static_cast(svcId->bytes), - static_cast(charId->bytes)); + static_cast(charId->bytes)); return result; } diff --git a/src/tools/chip-cert/Cmd_GenCert.cpp b/src/tools/chip-cert/Cmd_GenCert.cpp index c8d5f6a8af63d8..19add8abbd7e7f 100644 --- a/src/tools/chip-cert/Cmd_GenCert.cpp +++ b/src/tools/chip-cert/Cmd_GenCert.cpp @@ -214,7 +214,7 @@ const char * const gCmdOptionHelp = " ext-skid-missing - Certificate won't have required Subject Key ID extension.\n" " ext-extended-key-usage-missing - Certificate won't have required Extended Key Usage extension.\n" " signature - Error will be injected in one of the bytes of the signature value.\n" - "\n" + "\n" #endif // CHIP_CONFIG_INTERNAL_FLAG_GENERATE_OP_CERT_TEST_CASES ; diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/MTRTestClustersObjc.mm b/zzz_generated/darwin-framework-tool/zap-generated/cluster/MTRTestClustersObjc.mm index 51f61faf733325..a3f3e6d4b9f3d8 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/MTRTestClustersObjc.mm +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/MTRTestClustersObjc.mm @@ -56,171 +56,171 @@ - (void)writeAttributeIdentifyTypeWithValue:(NSNumber * _Nonnull)value completio { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -241,171 +241,171 @@ - (void)writeAttributeNameSupportWithValue:(NSNumber * _Nonnull)value completion { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -426,266 +426,266 @@ - (void)writeAttributeSceneCountWithValue:(NSNumber * _Nonnull)value completionH { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentSceneWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentGroupWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSceneValidWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNameSupportWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeLastConfiguredByWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -706,189 +706,189 @@ - (void)writeAttributeOnOffWithValue:(NSNumber * _Nonnull)value completionHandle { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGlobalSceneControlWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -909,171 +909,171 @@ - (void)writeAttributeSwitchTypeWithValue:(NSNumber * _Nonnull)value completionH { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -1094,279 +1094,279 @@ - (void)writeAttributeCurrentLevelWithValue:(NSNumber * _Nonnull)value completio { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRemainingTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentFrequencyWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMinFrequencyWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxFrequencyWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -1387,207 +1387,207 @@ - (void)writeAttributePolarityWithValue:(NSNumber * _Nonnull)value completionHan { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeStatusFlagsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeApplicationTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -1608,310 +1608,310 @@ - (void)writeAttributeDeviceListWithValue:(NSArray * _Nonnull)value completionHa { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Descriptor::Attributes::DeviceList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Descriptor::Attributes::DeviceList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRDescriptorClusterDeviceType class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRDescriptorClusterDeviceType class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRDescriptorClusterDeviceType *) value[i_0]; - listHolder_0->mList[i_0].type = element_0.type.unsignedIntValue; - listHolder_0->mList[i_0].revision = element_0.revision.unsignedShortValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (MTRDescriptorClusterDeviceType *) value[i_0]; + listHolder_0->mList[i_0].type = element_0.type.unsignedIntValue; + listHolder_0->mList[i_0].revision = element_0.revision.unsignedShortValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeServerListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClientListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePartsListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedShortValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedShortValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -1932,153 +1932,153 @@ - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value co { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -2096,213 +2096,213 @@ @implementation MTRTestAccessControl } - (void)writeAttributeSubjectsPerAccessControlEntryWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTargetsPerAccessControlEntryWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAccessControlEntriesPerFabricWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -2323,284 +2323,284 @@ - (void)writeAttributeActionListWithValue:(NSArray * _Nonnull)value completionHa { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedActions::Attributes::ActionList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedActions::Attributes::ActionList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRBridgedActionsClusterActionStruct class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRBridgedActionsClusterActionStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRBridgedActionsClusterActionStruct *) value[i_0]; - listHolder_0->mList[i_0].actionID = element_0.actionID.unsignedShortValue; - listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; - listHolder_0->mList[i_0].type - = static_castmList[i_0].type)>>( - element_0.type.unsignedCharValue); - listHolder_0->mList[i_0].endpointListID = element_0.endpointListID.unsignedShortValue; - listHolder_0->mList[i_0].supportedCommands = element_0.supportedCommands.unsignedShortValue; - listHolder_0->mList[i_0].status - = static_castmList[i_0].status)>>( - element_0.status.unsignedCharValue); - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (MTRBridgedActionsClusterActionStruct *) value[i_0]; + listHolder_0->mList[i_0].actionID = element_0.actionID.unsignedShortValue; + listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; + listHolder_0->mList[i_0].type + = static_castmList[i_0].type)>>( + element_0.type.unsignedCharValue); + listHolder_0->mList[i_0].endpointListID = element_0.endpointListID.unsignedShortValue; + listHolder_0->mList[i_0].supportedCommands = element_0.supportedCommands.unsignedShortValue; + listHolder_0->mList[i_0].status + = static_castmList[i_0].status)>>( + element_0.status.unsignedCharValue); } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeEndpointListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedActions::Attributes::EndpointList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedActions::Attributes::EndpointList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRBridgedActionsClusterEndpointListStruct class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRBridgedActionsClusterEndpointListStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRBridgedActionsClusterEndpointListStruct *) value[i_0]; - listHolder_0->mList[i_0].endpointListID = element_0.endpointListID.unsignedShortValue; - listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; - listHolder_0->mList[i_0].type - = static_castmList[i_0].type)>>( - element_0.type.unsignedCharValue); - { - using ListType_2 = std::remove_reference_tmList[i_0].endpoints)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.endpoints.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.endpoints.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + auto element_0 = (MTRBridgedActionsClusterEndpointListStruct *) value[i_0]; + listHolder_0->mList[i_0].endpointListID = element_0.endpointListID.unsignedShortValue; + listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; + listHolder_0->mList[i_0].type + = static_castmList[i_0].type)>>( + element_0.type.unsignedCharValue); + { + using ListType_2 = std::remove_reference_tmList[i_0].endpoints)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.endpoints.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.endpoints.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.endpoints.count; ++i_2) { + if (![element_0.endpoints[i_2] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.endpoints.count; ++i_2) { - if (![element_0.endpoints[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.endpoints[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedShortValue; - } - listHolder_0->mList[i_0].endpoints = ListType_2(listHolder_2->mList, element_0.endpoints.count); - } else { - listHolder_0->mList[i_0].endpoints = ListType_2(); + auto element_2 = (NSNumber *) element_0.endpoints[i_2]; + listHolder_2->mList[i_2] = element_2.unsignedShortValue; } + listHolder_0->mList[i_0].endpoints = ListType_2(listHolder_2->mList, element_0.endpoints.count); + } else { + listHolder_0->mList[i_0].endpoints = ListType_2(); } } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSetupUrlWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedActions::Attributes::SetupUrl::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedActions::Attributes::SetupUrl::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedActions::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedActions::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedActions::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedActions::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedActions::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedActions::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedActions::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedActions::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -2621,463 +2621,463 @@ - (void)writeAttributeDataModelRevisionWithValue:(NSNumber * _Nonnull)value comp { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeVendorNameWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::VendorName::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::VendorName::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeVendorIDWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::VendorID::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedShortValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::VendorID::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeProductNameWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::ProductName::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::ProductName::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeProductIDWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::ProductID::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::ProductID::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeHardwareVersionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeHardwareVersionStringWithValue:(NSString * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSoftwareVersionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSoftwareVersionStringWithValue:(NSString * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeManufacturingDateWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePartNumberWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeProductURLWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeProductLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSerialNumberWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeReachableWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::Reachable::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::Reachable::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeUniqueIDWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCapabilityMinimaWithValue:(MTRBasicClusterCapabilityMinimaStruct * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; - TypeInfo::Type cppValue; - cppValue.caseSessionsPerFabric = value.caseSessionsPerFabric.unsignedShortValue; - cppValue.subscriptionsPerFabric = value.subscriptionsPerFabric.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; + TypeInfo::Type cppValue; + cppValue.caseSessionsPerFabric = value.caseSessionsPerFabric.unsignedShortValue; + cppValue.subscriptionsPerFabric = value.subscriptionsPerFabric.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -3098,153 +3098,153 @@ - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value co { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -3265,212 +3265,212 @@ - (void)writeAttributeUpdatePossibleWithValue:(NSNumber * _Nonnull)value complet { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeUpdateStateWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeUpdateStateProgressWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -3491,192 +3491,192 @@ - (void)writeAttributeSupportedLocalesWithValue:(NSArray * _Nonnull)value comple { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSString class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSString class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSString *) value[i_0]; - listHolder_0->mList[i_0] = [self asCharSpan:element_0]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSString *) value[i_0]; + listHolder_0->mList[i_0] = [self asCharSpan:element_0]; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -3694,197 +3694,197 @@ @implementation MTRTestTimeFormatLocalization } - (void)writeAttributeSupportedCalendarTypesWithValue:(NSArray * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + completionHandler:(StatusCompletion)completionHandler +{ + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] - = static_castmList[i_0])>>(element_0.unsignedCharValue); - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] + = static_castmList[i_0])>>(element_0.unsignedCharValue); } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -3905,153 +3905,153 @@ - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value co { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -4072,192 +4072,192 @@ - (void)writeAttributeSourcesWithValue:(NSArray * _Nonnull)value completionHandl { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -4278,788 +4278,788 @@ - (void)writeAttributeStatusWithValue:(NSNumber * _Nonnull)value completionHandl { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::Status::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOrderWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::Order::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::Description::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::Description::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeWiredAssessedInputVoltageWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeWiredAssessedInputFrequencyWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeWiredCurrentTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeWiredAssessedCurrentWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeWiredNominalVoltageWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeWiredMaximumCurrentWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeWiredPresentWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActiveWiredFaultsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryVoltageWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryVoltage::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryVoltage::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryPercentRemainingWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryPercentRemaining::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryPercentRemaining::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryTimeRemainingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryTimeRemaining::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryTimeRemaining::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryChargeLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryChargeLevel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryChargeLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryReplacementNeededWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryReplacementNeeded::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryReplacementNeeded::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryReplaceabilityWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryReplaceability::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryReplaceability::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryPresentWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryPresent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryPresent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActiveBatteryFaultsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::ActiveBatteryFaults::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::ActiveBatteryFaults::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryReplacementDescriptionWithValue:(NSString * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryReplacementDescription::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryReplacementDescription::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryCommonDesignationWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryCommonDesignation::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryCommonDesignation::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryANSIDesignationWithValue:(NSString * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryANSIDesignation::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryANSIDesignation::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryIECDesignationWithValue:(NSString * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryIECDesignation::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryIECDesignation::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryApprovedChemistryWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryApprovedChemistry::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryApprovedChemistry::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryCapacity::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryCapacity::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryQuantityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryQuantity::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryQuantity::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryChargeStateWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryChargeState::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryChargeState::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryTimeToFullChargeWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryTimeToFullCharge::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryTimeToFullCharge::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryFunctionalWhileChargingWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryFunctionalWhileCharging::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryFunctionalWhileCharging::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBatteryChargingCurrentWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::BatteryChargingCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::BatteryChargingCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActiveBatteryChargeFaultsWithValue:(NSArray * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::ActiveBatteryChargeFaults::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + completionHandler:(StatusCompletion)completionHandler +{ + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::ActiveBatteryChargeFaults::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -5077,231 +5077,231 @@ @implementation MTRTestGeneralCommissioning } - (void)writeAttributeBasicCommissioningInfoWithValue:(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; - TypeInfo::Type cppValue; - cppValue.failSafeExpiryLengthSeconds = value.failSafeExpiryLengthSeconds.unsignedShortValue; - cppValue.maxCumulativeFailsafeSeconds = value.maxCumulativeFailsafeSeconds.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + TypeInfo::Type cppValue; + cppValue.failSafeExpiryLengthSeconds = value.failSafeExpiryLengthSeconds.unsignedShortValue; + cppValue.maxCumulativeFailsafeSeconds = value.maxCumulativeFailsafeSeconds.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRegulatoryConfigWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeLocationCapabilityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSupportsConcurrentConnectionWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -5322,319 +5322,319 @@ - (void)writeAttributeMaxNetworksWithValue:(NSNumber * _Nonnull)value completion { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNetworksWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRNetworkCommissioningClusterNetworkInfo class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRNetworkCommissioningClusterNetworkInfo class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRNetworkCommissioningClusterNetworkInfo *) value[i_0]; - listHolder_0->mList[i_0].networkID = [self asByteSpan:element_0.networkID]; - listHolder_0->mList[i_0].connected = element_0.connected.boolValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (MTRNetworkCommissioningClusterNetworkInfo *) value[i_0]; + listHolder_0->mList[i_0].networkID = [self asByteSpan:element_0.networkID]; + listHolder_0->mList[i_0].connected = element_0.connected.boolValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeScanMaxTimeSecondsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeConnectMaxTimeSecondsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeLastNetworkingStatusWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeLastNetworkIDWithValue:(NSData * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = [self asByteSpan:value]; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = [self asByteSpan:value]; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeLastConnectErrorValueWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.intValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.intValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -5655,153 +5655,153 @@ - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value co { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -5822,464 +5822,464 @@ - (void)writeAttributeNetworkInterfacesWithValue:(NSArray * _Nonnull)value compl { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRGeneralDiagnosticsClusterNetworkInterfaceType class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRGeneralDiagnosticsClusterNetworkInterfaceType class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRGeneralDiagnosticsClusterNetworkInterfaceType *) value[i_0]; - listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; - listHolder_0->mList[i_0].isOperational = element_0.isOperational.boolValue; - if (element_0.offPremiseServicesReachableIPv4 == nil) { - listHolder_0->mList[i_0].offPremiseServicesReachableIPv4.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].offPremiseServicesReachableIPv4.SetNonNull(); - nonNullValue_2 = element_0.offPremiseServicesReachableIPv4.boolValue; - } - if (element_0.offPremiseServicesReachableIPv6 == nil) { - listHolder_0->mList[i_0].offPremiseServicesReachableIPv6.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].offPremiseServicesReachableIPv6.SetNonNull(); - nonNullValue_2 = element_0.offPremiseServicesReachableIPv6.boolValue; - } - listHolder_0->mList[i_0].hardwareAddress = [self asByteSpan:element_0.hardwareAddress]; - { - using ListType_2 = std::remove_reference_tmList[i_0].IPv4Addresses)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.iPv4Addresses.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.iPv4Addresses.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + auto element_0 = (MTRGeneralDiagnosticsClusterNetworkInterfaceType *) value[i_0]; + listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; + listHolder_0->mList[i_0].isOperational = element_0.isOperational.boolValue; + if (element_0.offPremiseServicesReachableIPv4 == nil) { + listHolder_0->mList[i_0].offPremiseServicesReachableIPv4.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].offPremiseServicesReachableIPv4.SetNonNull(); + nonNullValue_2 = element_0.offPremiseServicesReachableIPv4.boolValue; + } + if (element_0.offPremiseServicesReachableIPv6 == nil) { + listHolder_0->mList[i_0].offPremiseServicesReachableIPv6.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].offPremiseServicesReachableIPv6.SetNonNull(); + nonNullValue_2 = element_0.offPremiseServicesReachableIPv6.boolValue; + } + listHolder_0->mList[i_0].hardwareAddress = [self asByteSpan:element_0.hardwareAddress]; + { + using ListType_2 = std::remove_reference_tmList[i_0].IPv4Addresses)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.iPv4Addresses.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.iPv4Addresses.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.iPv4Addresses.count; ++i_2) { + if (![element_0.iPv4Addresses[i_2] isKindOfClass:[NSData class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.iPv4Addresses.count; ++i_2) { - if (![element_0.iPv4Addresses[i_2] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSData *) element_0.iPv4Addresses[i_2]; - listHolder_2->mList[i_2] = [self asByteSpan:element_2]; - } - listHolder_0->mList[i_0].IPv4Addresses - = ListType_2(listHolder_2->mList, element_0.iPv4Addresses.count); - } else { - listHolder_0->mList[i_0].IPv4Addresses = ListType_2(); + auto element_2 = (NSData *) element_0.iPv4Addresses[i_2]; + listHolder_2->mList[i_2] = [self asByteSpan:element_2]; } + listHolder_0->mList[i_0].IPv4Addresses + = ListType_2(listHolder_2->mList, element_0.iPv4Addresses.count); + } else { + listHolder_0->mList[i_0].IPv4Addresses = ListType_2(); } - { - using ListType_2 = std::remove_reference_tmList[i_0].IPv6Addresses)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.iPv6Addresses.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.iPv6Addresses.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + } + { + using ListType_2 = std::remove_reference_tmList[i_0].IPv6Addresses)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.iPv6Addresses.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.iPv6Addresses.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.iPv6Addresses.count; ++i_2) { + if (![element_0.iPv6Addresses[i_2] isKindOfClass:[NSData class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.iPv6Addresses.count; ++i_2) { - if (![element_0.iPv6Addresses[i_2] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSData *) element_0.iPv6Addresses[i_2]; - listHolder_2->mList[i_2] = [self asByteSpan:element_2]; - } - listHolder_0->mList[i_0].IPv6Addresses - = ListType_2(listHolder_2->mList, element_0.iPv6Addresses.count); - } else { - listHolder_0->mList[i_0].IPv6Addresses = ListType_2(); + auto element_2 = (NSData *) element_0.iPv6Addresses[i_2]; + listHolder_2->mList[i_2] = [self asByteSpan:element_2]; } + listHolder_0->mList[i_0].IPv6Addresses + = ListType_2(listHolder_2->mList, element_0.iPv6Addresses.count); + } else { + listHolder_0->mList[i_0].IPv6Addresses = ListType_2(); } - listHolder_0->mList[i_0].type - = static_castmList[i_0].type)>>( - element_0.type.unsignedCharValue); } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + listHolder_0->mList[i_0].type + = static_castmList[i_0].type)>>( + element_0.type.unsignedCharValue); } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRebootCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeUpTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTotalOperationalHoursWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBootReasonsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActiveHardwareFaultsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActiveRadioFaultsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActiveNetworkFaultsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTestEventTriggersEnabledWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -6300,263 +6300,263 @@ - (void)writeAttributeThreadMetricsWithValue:(NSArray * _Nonnull)value completio { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRSoftwareDiagnosticsClusterThreadMetrics class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRSoftwareDiagnosticsClusterThreadMetrics class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRSoftwareDiagnosticsClusterThreadMetrics *) value[i_0]; - listHolder_0->mList[i_0].id = element_0.id.unsignedLongLongValue; - if (element_0.name != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); - definedValue_2 = [self asCharSpan:element_0.name]; - } - if (element_0.stackFreeCurrent != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].stackFreeCurrent.Emplace(); - definedValue_2 = element_0.stackFreeCurrent.unsignedIntValue; - } - if (element_0.stackFreeMinimum != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].stackFreeMinimum.Emplace(); - definedValue_2 = element_0.stackFreeMinimum.unsignedIntValue; - } - if (element_0.stackSize != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].stackSize.Emplace(); - definedValue_2 = element_0.stackSize.unsignedIntValue; - } + auto element_0 = (MTRSoftwareDiagnosticsClusterThreadMetrics *) value[i_0]; + listHolder_0->mList[i_0].id = element_0.id.unsignedLongLongValue; + if (element_0.name != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); + definedValue_2 = [self asCharSpan:element_0.name]; + } + if (element_0.stackFreeCurrent != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].stackFreeCurrent.Emplace(); + definedValue_2 = element_0.stackFreeCurrent.unsignedIntValue; + } + if (element_0.stackFreeMinimum != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].stackFreeMinimum.Emplace(); + definedValue_2 = element_0.stackFreeMinimum.unsignedIntValue; + } + if (element_0.stackSize != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].stackSize.Emplace(); + definedValue_2 = element_0.stackSize.unsignedIntValue; } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentHeapFreeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentHeapUsedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentHeapHighWatermarkWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -6577,1494 +6577,1494 @@ - (void)writeAttributeChannelWithValue:(NSNumber * _Nullable)value completionHan { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRoutingRoleWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNetworkNameWithValue:(NSString * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = [self asCharSpan:value]; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = [self asCharSpan:value]; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePanIdWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeExtendedPanIdWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMeshLocalPrefixWithValue:(NSData * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = [self asByteSpan:value]; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = [self asByteSpan:value]; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOverrunCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNeighborTableListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRThreadNetworkDiagnosticsClusterNeighborTable class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRThreadNetworkDiagnosticsClusterNeighborTable class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRThreadNetworkDiagnosticsClusterNeighborTable *) value[i_0]; - listHolder_0->mList[i_0].extAddress = element_0.extAddress.unsignedLongLongValue; - listHolder_0->mList[i_0].age = element_0.age.unsignedIntValue; - listHolder_0->mList[i_0].rloc16 = element_0.rloc16.unsignedShortValue; - listHolder_0->mList[i_0].linkFrameCounter = element_0.linkFrameCounter.unsignedIntValue; - listHolder_0->mList[i_0].mleFrameCounter = element_0.mleFrameCounter.unsignedIntValue; - listHolder_0->mList[i_0].lqi = element_0.lqi.unsignedCharValue; - if (element_0.averageRssi == nil) { - listHolder_0->mList[i_0].averageRssi.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].averageRssi.SetNonNull(); - nonNullValue_2 = element_0.averageRssi.charValue; - } - if (element_0.lastRssi == nil) { - listHolder_0->mList[i_0].lastRssi.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].lastRssi.SetNonNull(); - nonNullValue_2 = element_0.lastRssi.charValue; - } - listHolder_0->mList[i_0].frameErrorRate = element_0.frameErrorRate.unsignedCharValue; - listHolder_0->mList[i_0].messageErrorRate = element_0.messageErrorRate.unsignedCharValue; - listHolder_0->mList[i_0].rxOnWhenIdle = element_0.rxOnWhenIdle.boolValue; - listHolder_0->mList[i_0].fullThreadDevice = element_0.fullThreadDevice.boolValue; - listHolder_0->mList[i_0].fullNetworkData = element_0.fullNetworkData.boolValue; - listHolder_0->mList[i_0].isChild = element_0.isChild.boolValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (MTRThreadNetworkDiagnosticsClusterNeighborTable *) value[i_0]; + listHolder_0->mList[i_0].extAddress = element_0.extAddress.unsignedLongLongValue; + listHolder_0->mList[i_0].age = element_0.age.unsignedIntValue; + listHolder_0->mList[i_0].rloc16 = element_0.rloc16.unsignedShortValue; + listHolder_0->mList[i_0].linkFrameCounter = element_0.linkFrameCounter.unsignedIntValue; + listHolder_0->mList[i_0].mleFrameCounter = element_0.mleFrameCounter.unsignedIntValue; + listHolder_0->mList[i_0].lqi = element_0.lqi.unsignedCharValue; + if (element_0.averageRssi == nil) { + listHolder_0->mList[i_0].averageRssi.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].averageRssi.SetNonNull(); + nonNullValue_2 = element_0.averageRssi.charValue; + } + if (element_0.lastRssi == nil) { + listHolder_0->mList[i_0].lastRssi.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].lastRssi.SetNonNull(); + nonNullValue_2 = element_0.lastRssi.charValue; + } + listHolder_0->mList[i_0].frameErrorRate = element_0.frameErrorRate.unsignedCharValue; + listHolder_0->mList[i_0].messageErrorRate = element_0.messageErrorRate.unsignedCharValue; + listHolder_0->mList[i_0].rxOnWhenIdle = element_0.rxOnWhenIdle.boolValue; + listHolder_0->mList[i_0].fullThreadDevice = element_0.fullThreadDevice.boolValue; + listHolder_0->mList[i_0].fullNetworkData = element_0.fullNetworkData.boolValue; + listHolder_0->mList[i_0].isChild = element_0.isChild.boolValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRouteTableListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRThreadNetworkDiagnosticsClusterRouteTable class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRThreadNetworkDiagnosticsClusterRouteTable class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRThreadNetworkDiagnosticsClusterRouteTable *) value[i_0]; - listHolder_0->mList[i_0].extAddress = element_0.extAddress.unsignedLongLongValue; - listHolder_0->mList[i_0].rloc16 = element_0.rloc16.unsignedShortValue; - listHolder_0->mList[i_0].routerId = element_0.routerId.unsignedCharValue; - listHolder_0->mList[i_0].nextHop = element_0.nextHop.unsignedCharValue; - listHolder_0->mList[i_0].pathCost = element_0.pathCost.unsignedCharValue; - listHolder_0->mList[i_0].LQIIn = element_0.lqiIn.unsignedCharValue; - listHolder_0->mList[i_0].LQIOut = element_0.lqiOut.unsignedCharValue; - listHolder_0->mList[i_0].age = element_0.age.unsignedCharValue; - listHolder_0->mList[i_0].allocated = element_0.allocated.boolValue; - listHolder_0->mList[i_0].linkEstablished = element_0.linkEstablished.boolValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (MTRThreadNetworkDiagnosticsClusterRouteTable *) value[i_0]; + listHolder_0->mList[i_0].extAddress = element_0.extAddress.unsignedLongLongValue; + listHolder_0->mList[i_0].rloc16 = element_0.rloc16.unsignedShortValue; + listHolder_0->mList[i_0].routerId = element_0.routerId.unsignedCharValue; + listHolder_0->mList[i_0].nextHop = element_0.nextHop.unsignedCharValue; + listHolder_0->mList[i_0].pathCost = element_0.pathCost.unsignedCharValue; + listHolder_0->mList[i_0].LQIIn = element_0.lqiIn.unsignedCharValue; + listHolder_0->mList[i_0].LQIOut = element_0.lqiOut.unsignedCharValue; + listHolder_0->mList[i_0].age = element_0.age.unsignedCharValue; + listHolder_0->mList[i_0].allocated = element_0.allocated.boolValue; + listHolder_0->mList[i_0].linkEstablished = element_0.linkEstablished.boolValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePartitionIdWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeWeightingWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDataVersionWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeStableDataVersionWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeLeaderRouterIdWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDetachedRoleCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeChildRoleCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRouterRoleCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeLeaderRoleCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttachAttemptCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePartitionIdChangeCountWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBetterPartitionAttachAttemptCountWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeParentChangeCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxTotalCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxUnicastCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxBroadcastCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxAckRequestedCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxAckedCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxNoAckRequestedCountWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxDataCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxDataPollCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxBeaconCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxBeaconRequestCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxOtherCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxRetryCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxDirectMaxRetryExpiryCountWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxIndirectMaxRetryExpiryCountWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxErrCcaCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxErrAbortCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxErrBusyChannelCountWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxTotalCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxUnicastCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxBroadcastCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxDataCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxDataPollCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxBeaconCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxBeaconRequestCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxOtherCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxAddressFilteredCountWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxDestAddrFilteredCountWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxDuplicatedCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxErrNoFrameCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxErrUnknownNeighborCountWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxErrInvalidSrcAddrCountWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxErrSecCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxErrFcsCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRxErrOtherCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActiveTimestampWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePendingTimestampWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDelayWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSecurityPolicyWithValue:(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable)value - completionHandler:(StatusCompletion)completionHandler -{ - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0.rotationTime = value.rotationTime.unsignedShortValue; - nonNullValue_0.flags = value.flags.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + completionHandler:(StatusCompletion)completionHandler +{ + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0.rotationTime = value.rotationTime.unsignedShortValue; + nonNullValue_0.flags = value.flags.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeChannelMaskWithValue:(NSData * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelMask::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = [self asByteSpan:value]; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelMask::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = [self asByteSpan:value]; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOperationalDatasetComponentsWithValue: - (MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable)value - completionHandler:(StatusCompletion)completionHandler -{ - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0.activeTimestampPresent = value.activeTimestampPresent.boolValue; - nonNullValue_0.pendingTimestampPresent = value.pendingTimestampPresent.boolValue; - nonNullValue_0.masterKeyPresent = value.masterKeyPresent.boolValue; - nonNullValue_0.networkNamePresent = value.networkNamePresent.boolValue; - nonNullValue_0.extendedPanIdPresent = value.extendedPanIdPresent.boolValue; - nonNullValue_0.meshLocalPrefixPresent = value.meshLocalPrefixPresent.boolValue; - nonNullValue_0.delayPresent = value.delayPresent.boolValue; - nonNullValue_0.panIdPresent = value.panIdPresent.boolValue; - nonNullValue_0.channelPresent = value.channelPresent.boolValue; - nonNullValue_0.pskcPresent = value.pskcPresent.boolValue; - nonNullValue_0.securityPolicyPresent = value.securityPolicyPresent.boolValue; - nonNullValue_0.channelMaskPresent = value.channelMaskPresent.boolValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + (MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable)value + completionHandler:(StatusCompletion)completionHandler +{ + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0.activeTimestampPresent = value.activeTimestampPresent.boolValue; + nonNullValue_0.pendingTimestampPresent = value.pendingTimestampPresent.boolValue; + nonNullValue_0.masterKeyPresent = value.masterKeyPresent.boolValue; + nonNullValue_0.networkNamePresent = value.networkNamePresent.boolValue; + nonNullValue_0.extendedPanIdPresent = value.extendedPanIdPresent.boolValue; + nonNullValue_0.meshLocalPrefixPresent = value.meshLocalPrefixPresent.boolValue; + nonNullValue_0.delayPresent = value.delayPresent.boolValue; + nonNullValue_0.panIdPresent = value.panIdPresent.boolValue; + nonNullValue_0.channelPresent = value.channelPresent.boolValue; + nonNullValue_0.pskcPresent = value.pskcPresent.boolValue; + nonNullValue_0.securityPolicyPresent = value.securityPolicyPresent.boolValue; + nonNullValue_0.channelMaskPresent = value.channelMaskPresent.boolValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActiveNetworkFaultsListWithValue:(NSArray * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + completionHandler:(StatusCompletion)completionHandler +{ + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] - = static_castmList[i_0])>>(element_0.unsignedCharValue); - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] + = static_castmList[i_0])>>(element_0.unsignedCharValue); } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -8085,414 +8085,414 @@ - (void)writeAttributeBssidWithValue:(NSData * _Nullable)value completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = [self asByteSpan:value]; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = [self asByteSpan:value]; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSecurityTypeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeWiFiVersionWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeChannelNumberWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRssiWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.charValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.charValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBeaconLostCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBeaconRxCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePacketMulticastRxCountWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePacketMulticastTxCountWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePacketUnicastRxCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePacketUnicastTxCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentMaxRateWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOverrunCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -8513,330 +8513,330 @@ - (void)writeAttributePHYRateWithValue:(NSNumber * _Nullable)value completionHan { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFullDuplexWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.boolValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.boolValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePacketRxCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePacketTxCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTxErrCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCollisionCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOverrunCountWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCarrierDetectWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.boolValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.boolValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTimeSinceResetWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -8857,407 +8857,407 @@ - (void)writeAttributeVendorNameWithValue:(NSString * _Nonnull)value completionH { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeVendorIDWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedShortValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeProductNameWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeHardwareVersionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeHardwareVersionStringWithValue:(NSString * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSoftwareVersionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSoftwareVersionStringWithValue:(NSString * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeManufacturingDateWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePartNumberWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeProductURLWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeProductLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSerialNumberWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeReachableWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeUniqueIDWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -9278,207 +9278,207 @@ - (void)writeAttributeNumberOfPositionsWithValue:(NSNumber * _Nonnull)value comp { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMultiPressMaxWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -9499,207 +9499,207 @@ - (void)writeAttributeWindowStatusWithValue:(NSNumber * _Nonnull)value completio { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAdminFabricIndexWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAdminVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -9720,339 +9720,339 @@ - (void)writeAttributeNOCsWithValue:(NSArray * _Nonnull)value completionHandler: { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTROperationalCredentialsClusterNOCStruct class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTROperationalCredentialsClusterNOCStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTROperationalCredentialsClusterNOCStruct *) value[i_0]; - listHolder_0->mList[i_0].noc = [self asByteSpan:element_0.noc]; - if (element_0.icac == nil) { - listHolder_0->mList[i_0].icac.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].icac.SetNonNull(); - nonNullValue_2 = [self asByteSpan:element_0.icac]; - } - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + auto element_0 = (MTROperationalCredentialsClusterNOCStruct *) value[i_0]; + listHolder_0->mList[i_0].noc = [self asByteSpan:element_0.noc]; + if (element_0.icac == nil) { + listHolder_0->mList[i_0].icac.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].icac.SetNonNull(); + nonNullValue_2 = [self asByteSpan:element_0.icac]; } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFabricsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTROperationalCredentialsClusterFabricDescriptor class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTROperationalCredentialsClusterFabricDescriptor class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTROperationalCredentialsClusterFabricDescriptor *) value[i_0]; - listHolder_0->mList[i_0].rootPublicKey = [self asByteSpan:element_0.rootPublicKey]; - listHolder_0->mList[i_0].vendorId - = static_castmList[i_0].vendorId)>>( - element_0.vendorId.unsignedShortValue); - listHolder_0->mList[i_0].fabricId = element_0.fabricId.unsignedLongLongValue; - listHolder_0->mList[i_0].nodeId = element_0.nodeId.unsignedLongLongValue; - listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (MTROperationalCredentialsClusterFabricDescriptor *) value[i_0]; + listHolder_0->mList[i_0].rootPublicKey = [self asByteSpan:element_0.rootPublicKey]; + listHolder_0->mList[i_0].vendorId + = static_castmList[i_0].vendorId)>>( + element_0.vendorId.unsignedShortValue); + listHolder_0->mList[i_0].fabricId = element_0.fabricId.unsignedLongLongValue; + listHolder_0->mList[i_0].nodeId = element_0.nodeId.unsignedLongLongValue; + listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSupportedFabricsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCommissionedFabricsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTrustedRootCertificatesWithValue:(NSArray * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + completionHandler:(StatusCompletion)completionHandler +{ + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSData class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSData *) value[i_0]; - listHolder_0->mList[i_0] = [self asByteSpan:element_0]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSData *) value[i_0]; + listHolder_0->mList[i_0] = [self asByteSpan:element_0]; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentFabricIndexWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -10073,256 +10073,256 @@ - (void)writeAttributeGroupTableWithValue:(NSArray * _Nonnull)value completionHa { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRGroupKeyManagementClusterGroupInfoMapStruct class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRGroupKeyManagementClusterGroupInfoMapStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRGroupKeyManagementClusterGroupInfoMapStruct *) value[i_0]; - listHolder_0->mList[i_0].groupId = element_0.groupId.unsignedShortValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].endpoints)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.endpoints.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.endpoints.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + auto element_0 = (MTRGroupKeyManagementClusterGroupInfoMapStruct *) value[i_0]; + listHolder_0->mList[i_0].groupId = element_0.groupId.unsignedShortValue; + { + using ListType_2 = std::remove_reference_tmList[i_0].endpoints)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.endpoints.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.endpoints.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.endpoints.count; ++i_2) { + if (![element_0.endpoints[i_2] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.endpoints.count; ++i_2) { - if (![element_0.endpoints[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.endpoints[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedShortValue; - } - listHolder_0->mList[i_0].endpoints = ListType_2(listHolder_2->mList, element_0.endpoints.count); - } else { - listHolder_0->mList[i_0].endpoints = ListType_2(); + auto element_2 = (NSNumber *) element_0.endpoints[i_2]; + listHolder_2->mList[i_2] = element_2.unsignedShortValue; } + listHolder_0->mList[i_0].endpoints = ListType_2(listHolder_2->mList, element_0.endpoints.count); + } else { + listHolder_0->mList[i_0].endpoints = ListType_2(); } - if (element_0.groupName != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].groupName.Emplace(); - definedValue_2 = [self asCharSpan:element_0.groupName]; - } - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + if (element_0.groupName != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].groupName.Emplace(); + definedValue_2 = [self asCharSpan:element_0.groupName]; + } + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxGroupsPerFabricWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxGroupKeysPerFabricWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -10343,193 +10343,193 @@ - (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHan { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRFixedLabelClusterLabelStruct class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRFixedLabelClusterLabelStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRFixedLabelClusterLabelStruct *) value[i_0]; - listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; - listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (MTRFixedLabelClusterLabelStruct *) value[i_0]; + listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; + listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -10550,153 +10550,153 @@ - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value co { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -10717,171 +10717,171 @@ - (void)writeAttributeStateValueWithValue:(NSNumber * _Nonnull)value completionH { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -10902,276 +10902,276 @@ - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completion { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeStandardNamespaceWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSupportedModesWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRModeSelectClusterModeOptionStruct class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRModeSelectClusterModeOptionStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRModeSelectClusterModeOptionStruct *) value[i_0]; - listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; - listHolder_0->mList[i_0].mode = element_0.mode.unsignedCharValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].semanticTags)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.semanticTags.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.semanticTags.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + auto element_0 = (MTRModeSelectClusterModeOptionStruct *) value[i_0]; + listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; + listHolder_0->mList[i_0].mode = element_0.mode.unsignedCharValue; + { + using ListType_2 = std::remove_reference_tmList[i_0].semanticTags)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.semanticTags.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.semanticTags.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.semanticTags.count; ++i_2) { + if (![element_0.semanticTags[i_2] isKindOfClass:[MTRModeSelectClusterSemanticTag class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.semanticTags.count; ++i_2) { - if (![element_0.semanticTags[i_2] isKindOfClass:[MTRModeSelectClusterSemanticTag class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRModeSelectClusterSemanticTag *) element_0.semanticTags[i_2]; - listHolder_2->mList[i_2].mfgCode = element_2.mfgCode.unsignedShortValue; - listHolder_2->mList[i_2].value = element_2.value.unsignedShortValue; - } - listHolder_0->mList[i_0].semanticTags - = ListType_2(listHolder_2->mList, element_0.semanticTags.count); - } else { - listHolder_0->mList[i_0].semanticTags = ListType_2(); + auto element_2 = (MTRModeSelectClusterSemanticTag *) element_0.semanticTags[i_2]; + listHolder_2->mList[i_2].mfgCode = element_2.mfgCode.unsignedShortValue; + listHolder_2->mList[i_2].value = element_2.value.unsignedShortValue; } + listHolder_0->mList[i_0].semanticTags + = ListType_2(listHolder_2->mList, element_0.semanticTags.count); + } else { + listHolder_0->mList[i_0].semanticTags = ListType_2(); } } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -11191,498 +11191,498 @@ @implementation MTRTestDoorLock - (void)writeAttributeLockStateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeLockTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActuatorEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDoorStateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNumberOfTotalUsersSupportedWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNumberOfPINUsersSupportedWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNumberOfRFIDUsersSupportedWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNumberOfYearDaySchedulesSupportedPerUserWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNumberOfHolidaySchedulesSupportedWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxPINCodeLengthWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMinPINCodeLengthWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxRFIDCodeLengthWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMinRFIDCodeLengthWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCredentialRulesSupportWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNumberOfCredentialsSupportedPerUserWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSupportedOperatingModesWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedShortValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDefaultConfigurationRegisterWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedShortValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -11703,585 +11703,585 @@ - (void)writeAttributeTypeWithValue:(NSNumber * _Nonnull)value completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::Type::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePhysicalClosedLimitLiftWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePhysicalClosedLimitTiltWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentPositionLiftWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::CurrentPositionLift::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentPositionTiltWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::CurrentPositionTilt::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNumberOfActuationsLiftWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNumberOfActuationsTiltWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeConfigStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::ConfigStatus::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentPositionLiftPercentageWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercentage::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentPositionTiltPercentageWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercentage::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOperationalStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::OperationalStatus::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTargetPositionLiftPercent100thsWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::TargetPositionLiftPercent100ths::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTargetPositionTiltPercent100thsWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::TargetPositionTiltPercent100ths::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeEndProductTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::EndProductType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentPositionLiftPercent100thsWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentPositionTiltPercent100thsWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeInstalledOpenLimitLiftWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitLift::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeInstalledClosedLimitLiftWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitLift::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeInstalledOpenLimitTiltWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::InstalledOpenLimitTilt::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeInstalledClosedLimitTiltWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::InstalledClosedLimitTilt::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSafetyStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedShortValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -12302,225 +12302,225 @@ - (void)writeAttributeBarrierMovingStateWithValue:(NSNumber * _Nonnull)value com { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBarrierSafetyStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBarrierCapabilitiesWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBarrierPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -12541,576 +12541,576 @@ - (void)writeAttributeMaxPressureWithValue:(NSNumber * _Nullable)value completio { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxFlowWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMinConstPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxConstPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMinCompPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxCompPressureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMinConstSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxConstSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMinConstFlowWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxConstFlowWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMinConstTempWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxConstTempWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePumpStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedShortValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeEffectiveOperationModeWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeEffectiveControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCapacityWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSpeedWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePowerWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -13131,601 +13131,601 @@ - (void)writeAttributeLocalTemperatureWithValue:(NSNumber * _Nullable)value comp { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOutdoorTemperatureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOccupancyWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAbsMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAbsMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAbsMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAbsMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePICoolingDemandWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePIHeatingDemandWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeThermostatRunningModeWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeStartOfWeekWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNumberOfWeeklyTransitionsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNumberOfDailyTransitionsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeThermostatRunningStateWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSetpointChangeSourceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSetpointChangeAmountWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSetpointChangeSourceTimestampWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOccupiedSetbackMinWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOccupiedSetbackMaxWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeUnoccupiedSetbackMinWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeUnoccupiedSetbackMaxWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeACCoilTemperatureWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -13746,243 +13746,243 @@ - (void)writeAttributePercentCurrentWithValue:(NSNumber * _Nonnull)value complet { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSpeedMaxWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSpeedCurrentWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRockSupportWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeWindSupportWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -14003,153 +14003,153 @@ - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value co { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -14170,895 +14170,895 @@ - (void)writeAttributeCurrentHueWithValue:(NSNumber * _Nonnull)value completionH { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentSaturationWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRemainingTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDriftCompensationWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCompensationTextWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeColorTemperatureWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorTemperature::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorTemperature::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeColorModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNumberOfPrimariesWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary1XWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary1YWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary1IntensityWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary2XWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary2YWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary2IntensityWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary3XWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary3YWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary3IntensityWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary4XWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary4YWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary4IntensityWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary5XWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary5YWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary5IntensityWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary6XWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary6YWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePrimary6IntensityWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeEnhancedCurrentHueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeEnhancedColorModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeColorLoopActiveWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeColorLoopDirectionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeColorLoopTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeColorLoopStartEnhancedHueWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeColorLoopStoredEnhancedHueWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeColorCapabilitiesWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeColorTempPhysicalMinMiredsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeColorTempPhysicalMaxMiredsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCoupleColorTempToLevelMinMiredsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -15079,263 +15079,263 @@ - (void)writeAttributeMeasuredValueWithValue:(NSNumber * _Nullable)value complet { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMinMeasuredValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxMeasuredValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeToleranceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeLightSensorTypeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -15356,240 +15356,240 @@ - (void)writeAttributeMeasuredValueWithValue:(NSNumber * _Nullable)value complet { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMinMeasuredValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxMeasuredValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeToleranceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -15610,345 +15610,345 @@ - (void)writeAttributeMeasuredValueWithValue:(NSNumber * _Nullable)value complet { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMinMeasuredValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxMeasuredValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeToleranceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeScaledValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMinScaledValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxScaledValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeScaledToleranceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeScaleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.charValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -15969,240 +15969,240 @@ - (void)writeAttributeMeasuredValueWithValue:(NSNumber * _Nullable)value complet { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMinMeasuredValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxMeasuredValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeToleranceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -16223,240 +16223,240 @@ - (void)writeAttributeMeasuredValueWithValue:(NSNumber * _Nullable)value complet { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMinMeasuredValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMaxMeasuredValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeToleranceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -16477,208 +16477,208 @@ - (void)writeAttributeOccupancyWithValue:(NSNumber * _Nonnull)value completionHa { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOccupancySensorTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeOccupancySensorTypeBitmapWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -16699,171 +16699,171 @@ - (void)writeAttributeMACAddressWithValue:(NSString * _Nonnull)value completionH { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -16884,276 +16884,276 @@ - (void)writeAttributeChannelListWithValue:(NSArray * _Nonnull)value completionH { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRChannelClusterChannelInfo class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRChannelClusterChannelInfo class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRChannelClusterChannelInfo *) value[i_0]; - listHolder_0->mList[i_0].majorNumber = element_0.majorNumber.unsignedShortValue; - listHolder_0->mList[i_0].minorNumber = element_0.minorNumber.unsignedShortValue; - if (element_0.name != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); - definedValue_2 = [self asCharSpan:element_0.name]; - } - if (element_0.callSign != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].callSign.Emplace(); - definedValue_2 = [self asCharSpan:element_0.callSign]; - } - if (element_0.affiliateCallSign != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].affiliateCallSign.Emplace(); - definedValue_2 = [self asCharSpan:element_0.affiliateCallSign]; - } + auto element_0 = (MTRChannelClusterChannelInfo *) value[i_0]; + listHolder_0->mList[i_0].majorNumber = element_0.majorNumber.unsignedShortValue; + listHolder_0->mList[i_0].minorNumber = element_0.minorNumber.unsignedShortValue; + if (element_0.name != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); + definedValue_2 = [self asCharSpan:element_0.name]; + } + if (element_0.callSign != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].callSign.Emplace(); + definedValue_2 = [self asCharSpan:element_0.callSign]; + } + if (element_0.affiliateCallSign != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].affiliateCallSign.Emplace(); + definedValue_2 = [self asCharSpan:element_0.affiliateCallSign]; } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeLineupWithValue:(MTRChannelClusterLineupInfo * _Nullable)value - completionHandler:(StatusCompletion)completionHandler -{ - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Channel::Attributes::Lineup::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0.operatorName = [self asCharSpan:value.operatorName]; - if (value.lineupName != nil) { - auto & definedValue_2 = nonNullValue_0.lineupName.Emplace(); - definedValue_2 = [self asCharSpan:value.lineupName]; - } - if (value.postalCode != nil) { - auto & definedValue_2 = nonNullValue_0.postalCode.Emplace(); - definedValue_2 = [self asCharSpan:value.postalCode]; - } - nonNullValue_0.lineupInfoType = static_cast>( - value.lineupInfoType.unsignedCharValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + completionHandler:(StatusCompletion)completionHandler +{ + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Channel::Attributes::Lineup::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0.operatorName = [self asCharSpan:value.operatorName]; + if (value.lineupName != nil) { + auto & definedValue_2 = nonNullValue_0.lineupName.Emplace(); + definedValue_2 = [self asCharSpan:value.lineupName]; + } + if (value.postalCode != nil) { + auto & definedValue_2 = nonNullValue_0.postalCode.Emplace(); + definedValue_2 = [self asCharSpan:value.postalCode]; + } + nonNullValue_0.lineupInfoType = static_cast>( + value.lineupInfoType.unsignedCharValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentChannelWithValue:(MTRChannelClusterChannelInfo * _Nullable)value - completionHandler:(StatusCompletion)completionHandler -{ - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0.majorNumber = value.majorNumber.unsignedShortValue; - nonNullValue_0.minorNumber = value.minorNumber.unsignedShortValue; - if (value.name != nil) { - auto & definedValue_2 = nonNullValue_0.name.Emplace(); - definedValue_2 = [self asCharSpan:value.name]; - } - if (value.callSign != nil) { - auto & definedValue_2 = nonNullValue_0.callSign.Emplace(); - definedValue_2 = [self asCharSpan:value.callSign]; - } - if (value.affiliateCallSign != nil) { - auto & definedValue_2 = nonNullValue_0.affiliateCallSign.Emplace(); - definedValue_2 = [self asCharSpan:value.affiliateCallSign]; - } - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + completionHandler:(StatusCompletion)completionHandler +{ + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0.majorNumber = value.majorNumber.unsignedShortValue; + nonNullValue_0.minorNumber = value.minorNumber.unsignedShortValue; + if (value.name != nil) { + auto & definedValue_2 = nonNullValue_0.name.Emplace(); + definedValue_2 = [self asCharSpan:value.name]; + } + if (value.callSign != nil) { + auto & definedValue_2 = nonNullValue_0.callSign.Emplace(); + definedValue_2 = [self asCharSpan:value.callSign]; + } + if (value.affiliateCallSign != nil) { + auto & definedValue_2 = nonNullValue_0.affiliateCallSign.Emplace(); + definedValue_2 = [self asCharSpan:value.affiliateCallSign]; + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -17174,211 +17174,211 @@ - (void)writeAttributeTargetListWithValue:(NSArray * _Nonnull)value completionHa { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRTargetNavigatorClusterTargetInfo class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRTargetNavigatorClusterTargetInfo class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRTargetNavigatorClusterTargetInfo *) value[i_0]; - listHolder_0->mList[i_0].identifier = element_0.identifier.unsignedCharValue; - listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (MTRTargetNavigatorClusterTargetInfo *) value[i_0]; + listHolder_0->mList[i_0].identifier = element_0.identifier.unsignedCharValue; + listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentTargetWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -17399,311 +17399,311 @@ - (void)writeAttributeCurrentStateWithValue:(NSNumber * _Nonnull)value completio { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeStartTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDurationWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSampledPositionWithValue:(MTRMediaPlaybackClusterPlaybackPosition * _Nullable)value - completionHandler:(StatusCompletion)completionHandler -{ - new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); + completionHandler:(StatusCompletion)completionHandler +{ + new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0.updatedAt = value.updatedAt.unsignedLongLongValue; + if (value.position == nil) { + nonNullValue_0.position.SetNull(); } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0.updatedAt = value.updatedAt.unsignedLongLongValue; - if (value.position == nil) { - nonNullValue_0.position.SetNull(); - } else { - auto & nonNullValue_2 = nonNullValue_0.position.SetNonNull(); - nonNullValue_2 = value.position.unsignedLongLongValue; - } + auto & nonNullValue_2 = nonNullValue_0.position.SetNonNull(); + nonNullValue_2 = value.position.unsignedLongLongValue; } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePlaybackSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.floatValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.floatValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSeekRangeEndWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeSeekRangeStartWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -17724,215 +17724,215 @@ - (void)writeAttributeInputListWithValue:(NSArray * _Nonnull)value completionHan { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRMediaInputClusterInputInfo class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRMediaInputClusterInputInfo class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRMediaInputClusterInputInfo *) value[i_0]; - listHolder_0->mList[i_0].index = element_0.index.unsignedCharValue; - listHolder_0->mList[i_0].inputType - = static_castmList[i_0].inputType)>>( - element_0.inputType.unsignedCharValue); - listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; - listHolder_0->mList[i_0].description = [self asCharSpan:element_0.descriptionString]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (MTRMediaInputClusterInputInfo *) value[i_0]; + listHolder_0->mList[i_0].index = element_0.index.unsignedCharValue; + listHolder_0->mList[i_0].inputType + = static_castmList[i_0].inputType)>>( + element_0.inputType.unsignedCharValue); + listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; + listHolder_0->mList[i_0].description = [self asCharSpan:element_0.descriptionString]; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentInputWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -17953,153 +17953,153 @@ - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value co { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -18120,153 +18120,153 @@ - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value co { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -18287,192 +18287,192 @@ - (void)writeAttributeAcceptHeaderWithValue:(NSArray * _Nonnull)value completion { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSString class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSString class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSString *) value[i_0]; - listHolder_0->mList[i_0] = [self asCharSpan:element_0]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSString *) value[i_0]; + listHolder_0->mList[i_0] = [self asCharSpan:element_0]; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -18493,214 +18493,214 @@ - (void)writeAttributeOutputListWithValue:(NSArray * _Nonnull)value completionHa { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRAudioOutputClusterOutputInfo class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRAudioOutputClusterOutputInfo class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRAudioOutputClusterOutputInfo *) value[i_0]; - listHolder_0->mList[i_0].index = element_0.index.unsignedCharValue; - listHolder_0->mList[i_0].outputType - = static_castmList[i_0].outputType)>>( - element_0.outputType.unsignedCharValue); - listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (MTRAudioOutputClusterOutputInfo *) value[i_0]; + listHolder_0->mList[i_0].index = element_0.index.unsignedCharValue; + listHolder_0->mList[i_0].outputType + = static_castmList[i_0].outputType)>>( + element_0.outputType.unsignedCharValue); + listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentOutputWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -18721,192 +18721,192 @@ - (void)writeAttributeCatalogListWithValue:(NSArray * _Nonnull)value completionH { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedShortValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedShortValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -18927,321 +18927,321 @@ - (void)writeAttributeVendorNameWithValue:(NSString * _Nonnull)value completionH { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeVendorIDWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeApplicationNameWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeProductIDWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeApplicationWithValue:(MTRApplicationBasicClusterApplicationBasicApplication * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; - TypeInfo::Type cppValue; - cppValue.catalogVendorId = value.catalogVendorId.unsignedShortValue; - cppValue.applicationId = [self asCharSpan:value.applicationId]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; + TypeInfo::Type cppValue; + cppValue.catalogVendorId = value.catalogVendorId.unsignedShortValue; + cppValue.applicationId = [self asCharSpan:value.applicationId]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeStatusWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeApplicationVersionWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; - TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAllowedVendorListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = static_castmList[i_0])>>( - element_0.unsignedShortValue); - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = static_castmList[i_0])>>( + element_0.unsignedShortValue); } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -19262,153 +19262,153 @@ - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value co { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -19429,2353 +19429,2353 @@ - (void)writeAttributeMeasurementTypeWithValue:(NSNumber * _Nonnull)value comple { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDcVoltageWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDcVoltageMinWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDcVoltageMaxWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDcCurrentWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDcCurrentMinWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDcCurrentMaxWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDcPowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDcPowerMinWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDcPowerMaxWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDcVoltageMultiplierWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDcVoltageDivisorWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDcCurrentMultiplierWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDcCurrentDivisorWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDcPowerMultiplierWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeDcPowerDivisorWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcFrequencyWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcFrequencyMinWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcFrequencyMaxWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeNeutralCurrentWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTotalActivePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.intValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.intValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTotalReactivePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.intValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.intValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeTotalApparentPowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMeasured1stHarmonicCurrentWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMeasured3rdHarmonicCurrentWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMeasured5thHarmonicCurrentWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMeasured7thHarmonicCurrentWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMeasured9thHarmonicCurrentWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMeasured11thHarmonicCurrentWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMeasuredPhase1stHarmonicCurrentWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMeasuredPhase3rdHarmonicCurrentWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMeasuredPhase5thHarmonicCurrentWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMeasuredPhase7thHarmonicCurrentWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMeasuredPhase9thHarmonicCurrentWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeMeasuredPhase11thHarmonicCurrentWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcFrequencyMultiplierWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcFrequencyDivisorWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePowerMultiplierWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePowerDivisorWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeHarmonicCurrentMultiplierWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.charValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePhaseHarmonicCurrentMultiplierWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.charValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeInstantaneousVoltageWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeInstantaneousLineCurrentWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeInstantaneousActiveCurrentWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeInstantaneousReactiveCurrentWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeInstantaneousPowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsVoltageWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsVoltageMinWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsVoltageMaxWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsCurrentWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsCurrentMinWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsCurrentMaxWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActivePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActivePowerMinWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActivePowerMaxWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeReactivePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeApparentPowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePowerFactorWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.charValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcVoltageMultiplierWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcVoltageDivisorWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcCurrentMultiplierWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcCurrentDivisorWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcPowerMultiplierWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcPowerDivisorWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeVoltageOverloadWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeCurrentOverloadWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcVoltageOverloadWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcCurrentOverloadWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcActivePowerOverloadWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcReactivePowerOverloadWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAverageRmsOverVoltageWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAverageRmsUnderVoltageWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsExtremeOverVoltageWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsExtremeUnderVoltageWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsVoltageSagWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsVoltageSwellWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeLineCurrentPhaseBWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActiveCurrentPhaseBWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeReactiveCurrentPhaseBWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsVoltagePhaseBWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsVoltageMinPhaseBWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsVoltageMaxPhaseBWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsCurrentPhaseBWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsCurrentMinPhaseBWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsCurrentMaxPhaseBWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActivePowerPhaseBWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActivePowerMinPhaseBWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActivePowerMaxPhaseBWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeReactivePowerPhaseBWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeApparentPowerPhaseBWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePowerFactorPhaseBWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.charValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAverageRmsOverVoltageCounterPhaseBWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAverageRmsUnderVoltageCounterPhaseBWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsExtremeOverVoltagePeriodPhaseBWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsVoltageSagPeriodPhaseBWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsVoltageSwellPeriodPhaseBWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeLineCurrentPhaseCWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActiveCurrentPhaseCWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeReactiveCurrentPhaseCWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsVoltagePhaseCWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsVoltageMinPhaseCWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsVoltageMaxPhaseCWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsCurrentPhaseCWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsCurrentMinPhaseCWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsCurrentMaxPhaseCWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActivePowerPhaseCWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActivePowerMinPhaseCWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeActivePowerMaxPhaseCWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeReactivePowerPhaseCWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeApparentPowerPhaseCWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributePowerFactorPhaseCWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.charValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAverageRmsOverVoltageCounterPhaseCWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAverageRmsUnderVoltageCounterPhaseCWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsExtremeOverVoltagePeriodPhaseCWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsVoltageSagPeriodPhaseCWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeRmsVoltageSwellPeriodPhaseCWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler + completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end @@ -21796,153 +21796,153 @@ - (void)writeAttributeGeneratedCommandListWithValue:(NSArray * _Nonnull)value co { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAcceptedCommandListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedIntValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new MTRDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster->WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); } @end